Re-enable MathML capability in posts

Re-enable MathML capability in posts

by Christe McMenomy -
Number of replies: 3

I have been using MathML in posts to Moodle forums for several years without any issues by using the HTML editor to drop in the MathML html code, then returning to normal editing mode to add explanations and comments. 

However, when I created a recent post, it displayed correctly but as soon as I hit the post button, Moodle deleted all my MathML formatting and instigated   instead, rendering it unreadable as math. Previously entered MathML still renders correctly.

I'm assuming that when I upgraded the most recent Moodle version a month or so agao, I missed a security setting somewhere to allow MathML commands, but I don't know where. 

I need to allow both teachers and students to use Mathml code for our science and math courses.  I also don't want to open the Moodle to random code injections.  Is there a specific setting (or set of settings) which allow me to grant MathML permission to students and teachers?

Running: Moodle 3.10 on a Linux 5.4.97-gentoo system with php7.4.15 and mariadb 10.5.9.


Average of ratings: -
In reply to Christe McMenomy

Re: Re-enable MathML capability in posts

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
This may be do to a change in the configuration of MathJax filter. It does not seem to be working for me at the moment in 3.10 latest, but is in 3.9. MathML should display correctly in Firefox without the filter, but not Chrome. If Firefox is working it is not a filtering problem, but an issue with MathJax.
In reply to Daniel Thies

Re: Re-enable MathML capability in posts

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hello Christie,

I had both MathJax and the HTMLTidy filter enabled. Turning of the HTMLTidy filter seemed to fix the issue I was having. Can you check which filters you have enabled. Try it with only the MathJax filter enabled.

Daniel
In reply to Daniel Thies

Re: Re-enable MathML capability in posts

by Christe McMenomy -
I think I've managed to fix this. My editor was somehow reset to TinyMCE which didn't help, and I also needed permission to edit "As Is" text.