Last modified: 2014-10-19 18:34:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 35191 - Styles in math-tag are ignored when using MathJax
Styles in math-tag are ignored when using MathJax
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
Math (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Brion Vibber
:
: 36144 (view as bug list)
Depends on:
Blocks: 31406 36144 make-mathjax-default
  Show dependency treegraph
 
Reported: 2012-03-13 09:15 UTC by Michael M.
Modified: 2014-10-19 18:34 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Proof of concept (234.58 KB, patch)
2012-06-02 13:27 UTC, Derk-Jan Hartman
Details

Description Michael M. 2012-03-13 09:15:10 UTC
<math style="border: 1px blue; border-style: dashed; padding: 1em;">a^2+b^2=c^2</math> comes without the border in MathJax.
Comment 1 Brion Vibber 2012-03-14 22:52:03 UTC
The style probably needs to be put on an outer <span> that doesn't get replaced.
Comment 2 Derk-Jan Hartman 2012-03-25 19:17:46 UTC
Noticed the original HTML wasn't even outputting "style". Fixed this in Ia267aa211cb1bcb2023cd3f87bbc83c983ffc91f

MathJax still removes the styling, will require another patch.
Comment 3 Derk-Jan Hartman 2012-06-02 13:27:25 UTC
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.
Comment 4 Derk-Jan Hartman 2012-09-07 17:56:21 UTC
*** Bug 36144 has been marked as a duplicate of this bug. ***
Comment 5 Matthew Flaschen 2013-06-05 05:10:20 UTC
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.
Comment 6 physikerwelt 2013-12-01 11:41:25 UTC
https://gerrit.wikimedia.org/r/#/c/90748/
Comment 7 physikerwelt 2014-10-19 18:34:05 UTC
I guess the solution is
"The style probably needs to be put on an outer <span> that doesn't get replaced."

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links