forked from waylonflinn/markdown-it-katex
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix HTML sanitization escape via math syntax errors.
By default, invoke KaTeX in ‘throwOnError:false‘ mode, so that it will produce _something_ from any input, and in particular, something which is guaranteed not to allow any live HTML tags through from the input. (Unless you are using ‘trust:true‘, in which case you presumably know what you are doing and why.) throwOnError:true mode can be re-enabled with plugin options, but then this plugin will **not** catch any exceptions that are thrown, leaving recovery up to a higher level. Since this is a significant behavior change, but one that is more likely to *fix* bugs in dependent programs than to introce them, the version number is now 2.1.0. Fixes waylonflinn#26, waylonflinn#30, and waylonflinn#7. I would like to thank @khrykin, poster of waylonflinn#7, for the idea that maybe the exception handlers inside this plugin should just be completely removed.
- Loading branch information
Showing
6 changed files
with
119 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters