Skip to content

Prevent excessive sanitization of AsciiDoc ouptut

Problem to solve

AsciiDoc output is sanitized by the same filter as for Markdown, and Banzai::Filter::SanitizationFilter is very strict. This strips much of the AsciiDoc generated mark up need for correct formatting.

Loosening the sanitization rules would likely fix many of the outstanding AsciiDoc formatting problems.

Further details

The Banzai::Filter::SanitizationFilter is currently used by both the Banzai::Pipeline::GfmPipeline and Banzai::Pipeline::AsciiDocPipeline, while it's really written specifically for the HTML output by Banzai::Filter::MarkdownFilter, not Asciidoctor.convert.

Proposal

Implement a separate AsciidocSanitizationFilter, perhaps based on Banzai::Filter::SanitizationFilter, with specific looser rules for Asciidoc.

Links / references