Mathjax Bug that Crashes Anki when Adding new Card

Steps to replicate:

  1. Create a new card with the following as raw html
<ul><li>\</li><li><anki-mathjax></anki-mathjax><anki-mathjax></anki-mathjax></li></ul>
  1. Add a ( after the first \ (it does not work if you add it in the raw html)

  2. Anki will crash.

I have tested this on 2 computers and Anki reliably crashes on this.

I have also tried the following in raw html

<ul><li>\</li><li><anki-mathjax></anki-mathjax></li></ul>

When you add ( after the first \, you will expect the output to be

<ul><li>\(</li><li><anki-mathjax></anki-mathjax></li></ul>

But instead, the output is

<ul><li><anki-mathjax></anki-mathjax></li><li>\(</li></ul>

I think the bug is related to this

1 Like

I have simplified the string that causes it to crash:

<b>\</b><anki-mathjax></anki-mathjax><anki-mathjax></anki-mathjax>

The b tag can be replaced by anything

I suspect this is another instance of MathJax tag detection gets confused by nested markers · Issue #2012 · ankitects/anki · GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.