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

enhancement request - sanitize <script> tags in MathJax #128

trevor opened this issue May 30, 2014 · 1 comment

enhancement request - sanitize <script> tags in MathJax #128

trevor opened this issue May 30, 2014 · 1 comment


Copy link

@trevor trevor commented May 30, 2014

Sorry if I'm missing the obvious way to do this:

I'd like to sanitize input between the MathJax markers such that script tags are not allowed. This seems relatively straightforward elsewhere in user-submitted kramdown content, but the MathJax tags appear to allow injection.

For instance:

$$ <script>alert('a')</script> <script>alert('b')</script> $$

is rendered as:

<script type="math/tex; mode=display">% <![CDATA[
 <script>alert('a')</script> <script>alert('b')</script>  %]]></script>

Which causes the second alert b to appear.

Copy link

@gettalong gettalong commented Jun 2, 2014

Thanks for reporting this bug! This will be fixed in the next release.

@gettalong gettalong closed this in 072b5da Jun 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants