talyssonoc / react-katex

Display math in TeX with KaTeX and ReactJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Completely crashes entire site

jaqxues opened this issue · comments

Unexpected behaviour! If you give it some specific input, it has the potential to crash the entire website.

Example: \begin{\pmatrix}. This will not render probably, error handling will work incorrectly and completely remove the entire body of the website!

Hey @jaqxues , can you provide and example reproducing the bug?

Turns out the issue lies in Katex itself. Just noticed that it applies on the demo site.

However some form of error handling would be appreciated if a single error can do this...

As an example to reproduce the bug, it really suffices to replace \\begin{pmatrix} with \\begin{\\pmatrix} here (in the given example package).