Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all dependencies and fix HTML sanitization escape #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zackw
Copy link

@zackw zackw commented Dec 3, 2022

This PR fixes issues #7, #18, #19, #21, #26, #27, and #30, and partially addresses issue #16. It subsumes PRs #12, #14, #17, #20, #29, #31, #33, and #36. See individual commits for explanation of the changes.

PRs #13 and #34 may still have worthwhile changes, I haven't looked at them very hard.

Notably, katex goes from 0.6.0 to 0.16.0 and (for testing purposes
only) markdown-it from 6.0.0 to 13.0.0.  Several tests had to be
updated as katex’s HTML rendering of many math constructs has changed,
but no code changes are required.

Fixes issues waylonflinn#18, waylonflinn#19, waylonflinn#21, waylonflinn#27. Partially addresses waylonflinn#16.
Test cases added.
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.
@gaspard
Copy link

gaspard commented May 15, 2024

Pull request #41 superseeds this one.

@zackw your pull request have been sleeping for nearly two years. Should there be an official fork ? What is your opinion ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants