Don't strip MathML from KaTeX-rendered markup
The following discussion from !59132 (merged) should be addressed:
-
@markrian started a discussion: It turns out that KaTeX by default renders HTML and MathML, the former for visual rendering, and the latter for accessibility. This DOMPurify
ALLOWED_TAGSoption actually ends up stripping out any MathML rendered by KaTeX.We'd probably prefer to keep the rendered MathML in place. I'll open up a follow-up issue to track this.
Possible solutions
- Manually add MathML tags to the
ALLOWED_TAGSlist - Adopt the
USE_PROFILESoption (though apparently that overrides theALLOWED_TAGSoption, so this might not be a good idea)
Edited by Mark Florian