HTMLPipeline v3 is a massive improvement over this still much loved (and woefully under-maintained) project. This section will attempt to list all of the breaking changes between the two versions and provide suggestions on how to upgrade.
This project is now under a module called HTMLPipeline
, not HTML::Pipeline
.
The following filters were removed:
AutolinkFilter
: this is handled by Commonmarker and can be disabled/enabled through theMarkdownFilter
'scontext
hashSanitizationFilter
: this is handled by Selma; configuration can be done through thesanitization_config
hashEmailReplyFilter
CamoFilter
The new way to call this project is as follows:
HTMLPipeline.new(
text_filters: [], # array of instantiated (`.new`ed) `HTMLPipeline::TextFilter`
convert_filter:, # a filter that runs to turn text into HTML
sanitization_config: {}, # an allowlist of elements/attributes/protocols to keep
node_filters: []) # array of instantiated (`.new`ed) `HTMLPipeline::NodeFilter`
Please refer to the README for more information on constructing filters. In most cases, the underlying filter needs only a few changes, primarily to make use of Selma rather than Nokogiri.