Last modified: 2014-10-19 18:34:05 UTC
<math style="border: 1px blue; border-style: dashed; padding: 1em;">a^2+b^2=c^2</math> comes without the border in MathJax.
The style probably needs to be put on an outer <span> that doesn't get replaced.
Noticed the original HTML wasn't even outputting "style". Fixed this in Ia267aa211cb1bcb2023cd3f87bbc83c983ffc91f MathJax still removes the styling, will require another patch.
Created attachment 10686 [details] Proof of concept OK, now the attributes have to be moved from the tex span to the jax math script node (this should happen in wiki2jax.js). Once they are there, MathJax needs to be adapted to copy the attributes AGAIN from the script node and apply them to the HTML formatted node. I did a quick mockup to verify that it can work (see attached patch), but it will require changes to MathJax and the problem is in merging and filtering the attributes that we need of course. That is something we have function for in MediaWiki, but those are not available inside MathJax right now.
*** Bug 36144 has been marked as a duplicate of this bug. ***
https://gerrit.wikimedia.org/r/#/c/64523/ is a proposed change to add safe mode. As currently configured, I believe this would block all inline styles, and classes that don't start with MJX-. See http://docs.mathjax.org/en/latest/options/Safe.html#configure-safe The safe mode change is (as it sounds like) intended to promote security (avoiding XSS), but it conflicts with this bug.
https://gerrit.wikimedia.org/r/#/c/90748/
I guess the solution is "The style probably needs to be put on an outer <span> that doesn't get replaced."