Skip to content

Commit

Permalink
Remove MathJax rather than trying to relocate it, for now
Browse files Browse the repository at this point in the history
  • Loading branch information
pde committed Jun 20, 2017
1 parent b87fc37 commit ee07589
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sanitise.py
Expand Up @@ -9,8 +9,13 @@
html = html.replace("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js",
"js/require-2.0.3.min.js")

html = html.replace("https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML",
"js/MathJax.js")
# MathJax is not a single script that's easy to relocate. Eventually we may want to follow
# http://docs.mathjax.org/en/latest/start.html#installing-your-own-copy-of-mathjax
# but for now, we don't actually use MathJax so let's remove it.
#html = html.replace("https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML",
# "js/MathJax.js")

html = html.replace('<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>', '')

assert 'script src="http' not in html, "HTMLified Notebook appears to contain unhandled 3rd party JS, please fix sanitise.py"
assert 'src="http' not in html, "HTMLified Notebook appears to contain unhandled 3rd party embed, please fix sanitise.py"
Expand Down

0 comments on commit ee07589

Please sign in to comment.