freedit-org / freedit

The safest and lightest forum, powered by rust.
https://freedit.eu
MIT License
193 stars 23 forks source link

whitelist mathml tags in html sanitizer #126

Closed aszepieniec closed 11 months ago

aszepieniec commented 11 months ago

Embedded LaTeX code is not rendered correctly even though it is correctly converted to MathML. The incorrect rendering comes from the HTML sanitizer, ammonia, which filters foreign tags out. This PR fixes the issue by adding all MathML tags to an explicit whitelist.

freedit-dev commented 11 months ago

Thanks!