This should be trivial - trying to include a javascript library in a blog post. The trouble seems to be with
<div id="box" class=..."></div>
<script type="text/javascript">
var board = JXG.JSXGraph.initBoard('box', ... )
</script>
Now I know that JXG is being loaded properly, but the single quotes around 'box'
in the third line are turned into
‘box’
in the HTML page generated by Hugo, and the browser (both Chrome and Firefox) complains about an illegal character. I would have thought that the <script type="text/javascript">
would ensure that all commands in the script would be fed without change into the javascript library for processing, but it seems that even within this script, some string-to-HTML conversion is being done.
How can I ensure that all commands inside <script> ... </script>
are fed to javascript precisely as written?
(Note to moderators: this is very similar to a question I’ve asked in another topic; I’m creating a new topic in the hope of finding some more people who might be managing this issue themselves.)