mod_annot editor

Annotate Section

Markup-aware Solutions

Since the output is HTML, we can do better again, using a markup-aware filter rather than brute-force regexps. For example, mod_proxy_html's ProxyHTMLStripComments directive does the job. However, Barnett's other fixes involve changing text, so for them we'd need to resort to mod_publisher, with MLCommentMode set to strip comments and MLRewriteRules to replace text. The advantage of markup-aware parsing over mod_line_edit is that it doesn't fail on unexpected character sequences, such as <!-- or --> that are not comment delimiters.

To conclude, let's compare the three solutions in terms of their performance overhead (external programs and parses of the payload involved) and parse correctness. For most purposes, performance will be what really matters.

External ProgramsParsesCorrectness