gjtorikian / html-pipeline

HTML processing filters and utilities
MIT License
2.27k stars 380 forks source link

Add MathML elements to whitelist #336

Closed alexmilowski closed 1 year ago

alexmilowski commented 3 years ago

In looking at lib/html/pipeline/sanitization_filter.rb, I see that all the MathML elements are missing from the whitelist. Presentational MathML is certainly innocuous markup. It could be added to this list without having harmful side effects.

Meanwhile, MathML is part of HTML5 and it is essential for creating accessible web pages with embedded Mathematics.

I'd be happy to provide a list of elements to add to the whitelist.

gjtorikian commented 3 years ago

Sounds good to me.

fred-wang commented 3 years ago

I recommend relying on https://mathml-refresh.github.io/mathml-core/#mathml-elements-and-attributes

alexmilowski commented 3 years ago

I should just write a PR for this.

gjtorikian commented 1 year ago

A new (beta) release of HTML-Proofer has been released, v3.0.0.pre1. I tried to go back and address all the issues in this repo. For this specific issue, I've opted to keep the sanitization process the same. However, downstream consumers can easily make any change they want to the sanitization process; see the updated README for more information.