Code: Select all
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bag Distance — py_stringmatching 0.4.2 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script async="async" src="file:///usr/share/javascript/mathjax/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="_static/js/theme.js"></script>
With NoScript disabled, everything works fine. But with NoScript enabled, even with file: marked as Trusted, things go wrong and the console logs two error messages:
Loading failed for the <script> with source “file:///extensions/MathMenu.js?V=2.7.9”.
Loading failed for the <script> with source “file:///extensions/MathZoom.js?V=2.7.9”.
Tracing the execution shows that things go wrong at line 3137 of MathJax.js:
Code: Select all
var scripts = (document.documentElement || document).getElementsByTagName("script");
Code: Select all
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
Code: Select all
"<head>\n
<meta charset=\"utf-8\"><meta name=\"generator\" content=\"Docutils 0.17.1: http://docutils.sourceforge.net/\">\n\n
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n
<title>Bag Distance — py_stringmatching 0.4.2 documentation</title>\n
<link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\">\n
<link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\">\n \n
<script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script></head>"
Worse than this, though, the behaviour is not consistent. For example, the python-abydos-doc package has a very similar webpage, /usr/share/doc/python3-abydos/html/abydos.distance.html, also generated by Sphinx, and this renders perfectly: the innerHTML value is the whole webpage, and getElementsByTagName returns all 7 script tag elements.
I cannot understand what NoScript has done here or why. Any suggestions would be most welcome!
Thanks, Julian