[Bug?] Handle html entities in mathjax

Oftentimes, when I would copy/paste latex code, html entities like ‘ ’ gets copied along the way (or just selecting text in the WYSIWYG we may not realize a “no break space” or other entity is being selected)
and so, when converting to mathjax with the icon, or the shortcut “ctrl-m then m”, the math doesn’t render properly:

The issue only arise when editing the fields of a card, either in the browser, or adding cards; preview and review mode will render fine, since mathjax actually handle this corner case. My guess is that the new Qt UI (pretty awesome by the way) is not handling that corner case.

Does the issue exist in 2.1.60?

Yes:
mathjax_buganki260

Thank you, I’ve logged this on MathJax doesn't handle non-breaking spaces and other entities · Issue #2402 · ankitects/anki · GitHub

1 Like