-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TeX annotation in MathML output mode should be XML escaped #935
Comments
I think it sould be fixed here. |
The reason is probably that we didn't expect MathJax-node, i.e., the only application would be "Show Source" in the menu. Here's what it's doing https://github.com/physikerwelt/MathJax/blob/master/unpacked/extensions/MathMenu.js#L760-L761 IIUC the best practice within XML is to use CDATA (e.g., http://jats.nlm.nih.gov/archiving/tag-library/1.1d1/n-skz0.html) but that wouldn't work in an HTML settings -- and I think we'd need both. So yes, I'd say that's reasonable but I'm not sure whether we need an XML / CDATA option. |
On 14 October 2014 17:06, Peter Krautzberger notifications@github.com
David |
I have a fix that works for me. I'll create a pull request soon. |
Thanks, @davidcarlisle and thanks @physikerwelt for working on a pull request. |
XML-escape TeX annotation (Resolves issue #935)
Is a treeReftest sufficient? E.g., <math xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<merror>
<mtext>&<></mtext>
</merror>
<annotation encoding="application/x-tex">&<></annotation>
</semantics>
</math> |
Oh nevermind. I should remember my TeX... |
No, you will need to use a script test, because the change is in |
add test for mathjax/MathJax#935
==> In Testsuite UI/issue935.html |
* for some reason the TeX annotation was removed again by accident * reintroduce this feature originally fixed in I79cf4e0ac40feae97da1dad8a172a6fc0d7987de * the escaping issue was fixed in upstream mathjax/MathJax#935 Bug: T73673 Change-Id: I5b05e6d7c1947755c7715396468137fe6a0d56f7
It would be nice if the TeX annotation generted in the MathML output would be XML escaped.
Otherwise, XML validation tools might cosinder the characters
& < >...
to be invalid.In https://gerrit.wikimedia.org/r/#/c/166556/ provides a workaround for most cases, but if the TeX string contains "" we could have a problem with the woraround.
As far as I know this is a MathJax and not a MathJax node bug, but feel free to move the bug if I'm wrong.
The text was updated successfully, but these errors were encountered: