Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #2822
Closed
Open
Issue created Jan 19, 2022 by Administrator@rootContributor

class='MJX-TeXAtom-ORD' in MathML crashes mathml2chtml

Created by: NSoiffer

Issue Summary

If class='MJX-TeXAtom-ORD' is present in MathML being converted by mathml2chtml, then the function crashes. This happens in both Firefox and Chrome

Steps to Reproduce:

  1. Open https://mathjax.github.io/MathJax-demos-web/input-mml2chtml.html
  2. Paste the following MathML into the input area:
 <math display='block' id='Mna33kyx-0'>
    <mn class='MJX-TeXAtom-ORD' id='Mna33kyx-9'>2</mn>
 </math>
  1. Click Render and open the debugger to see the message:
Uncaught Error: Unexpected text node "2"
    at t.error (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:205225)
    at t.addText (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:204033)
    at t.addChildren (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:203371)
    at t.makeNode (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:202222)
    at t.addChildren (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:203503)
    at t.makeNode (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:202222)
    at t.addChildren (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:203503)
    at t.makeNode (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:202222)
    at t.addChildren (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:203503)
    at t.makeNode (cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js:1:202222)

I know it might seem strange to have this internal class set, but the situation is that the math is being grabbed from the web, processed a little, and being sent back to MathJax for rendering. Since the original source (Wikipedia) used MathJax, that shows up.

Technical details:

  • MathJax V3.2.0
Assignee
Assign to
Time tracking