Stop wrapping math in <script type="math/tex">...</script>. - #1499
Stop wrapping math in <script type="math/tex">...</script>.#1499drgrice1 wants to merge 1 commit into
<script type="math/tex">...</script>.#1499Conversation
2491b05 to
b258d6f
Compare
somiaj
left a comment
There was a problem hiding this comment.
I can confirm it fixes the issue. Probably needs a hotfix.
b258d6f to
149b0cd
Compare
|
If there are no more from the MathJax configuration, as well as It must have something to do with the faked MathItem that is created there. I'll look into it, but since these seems to resolve the problem, I'm n to sure ho much time I can put to it. |
|
I do plan to put in a pull request to webwork2 to remove that @somiaj: The |
|
Should we worry about breaking third party macros and the likes if we remove lines that deal with the script tags? I am not worried if we break them, just something to consider. |
|
How would removing the |
|
@drgrice1 Yea, I knew they didn't need to be escaped, I was just thinking in terms of consistency, someone might wonder why |
|
I was just considering what was happening of some third party macro was using |
|
Okay, since the feedback case is handled in post processing anyway, and always goes through |
|
@somiaj: You might note that in the usual way that problems are rendered via the translator, the |
149b0cd to
1be02bb
Compare
|
I switched to using |
1be02bb to
705618d
Compare
somiaj
left a comment
There was a problem hiding this comment.
Double checked again that the issue is fixed. I still think this needs to be a hotfix as the broken problem was originally from the OPL.
The injection of `<script type="math/tex">...</script>` tags by PG is removed by openwebwork/pg#1499. So the script tag handling in the `mathjax-config.js` file is no longer needed.
This used to be handled directly by MathJax long ago, but it no longer does so. Using `\(...\)` or `\[...\]` now works. So just do that. Also make sure that `&`, `<`, and `>` are properly HTML escaped. This actually gets done when the `post_process_content` method is called, but just in case the `general_math_ev3` method also does this. Note the `Mojo::DOM` parser is smart enough not to doubly escape these things. The script tag handling in the webwork2 `mathjax-config.js` file seems to be causing issues in some cases, and switching to using `\(...\)` or `\[...\]` fixes those issues. See openwebwork#1498 for details. It is also time to start doing some code clean up. I just did some minimal clean up of the `general_math_ev3` method.
705618d to
ef8a8ff
Compare
The injection of `<script type="math/tex">...</script>` tags by PG is removed by openwebwork/pg#1499. So the script tag handling in the `mathjax-config.js` file is no longer needed.
This used to be handled directly by MathJax long ago, but it no longer does so. Using
\(...\)or\[...\]now works. So just do that. Also make sure that&,<, and>are properly HTML escaped. This actually gets done when thepost_process_contentmethod is called, but just in case thegeneral_math_ev3method also does this. Note theMojo::DOMparser is smart enough not to doubly escape these things.The script tag handling in the webwork2
mathjax-config.jsfile seems to be causing issues in some cases, and switching to using\(...\)or\[...\]fixes those issues. See #1498 for details.It is also time to start doing some code clean up. I just did some minimal clean up of the
general_math_ev3method.