A Ruby framework for defining and applying chainable content filters to transform user-provided text into safe HTML.
HTML-Pipeline is a Ruby framework for processing HTML content through a series of chainable filters. It transforms user-provided text—like Markdown—into safe, enriched HTML by applying sanitization, conversion, and custom transformations in a modular pipeline. It solves the problem of securely handling user-generated content while enabling features like mention linking, emoji support, and syntax highlighting.
Ruby developers building web applications that need to process and sanitize user-generated content, such as forums, comment systems, or documentation platforms. It's particularly useful for teams requiring customizable content transformation workflows.
Developers choose HTML-Pipeline for its modular, chainable filter design, which allows precise control over content processing while ensuring built-in safety against XSS. Its extensibility and GitHub-originated pedigree make it a reliable choice for complex HTML transformation needs.
HTML processing filters and utilities
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Filters can be composed in a customizable sequence, enabling precise control over each transformation step, as demonstrated in pipeline examples for markdown conversion and mention linking.
Automatically sanitizes HTML using configurable allowlists based on Selma, preventing common security vulnerabilities without additional code.
Provides ready-to-use filters for tasks like Markdown conversion, emoji replacement, and syntax highlighting, reducing development time for common content enrichment needs.
Uses a shared context hash to pass configuration and metadata between filters, allowing dynamic adjustments such as disabling footnotes in MarkdownFilter.
Dependencies are not bundled; users must manually add gems like 'rouge' for syntax highlighting, increasing setup complexity and potential version conflicts.
Originally from GitHub but now standalone, which may lead to slower updates or reduced support, as noted in the README's disclaimer about independence.
Customizing sanitization and filter sequences requires deep understanding of the Selma library and filter lifecycle, making initial setup non-trivial.