[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [Bug] Verbatim code gets interpreted
From: |
Sébastien Vauban |
Subject: |
[O] [Bug] Verbatim code gets interpreted |
Date: |
Mon, 07 Mar 2011 09:06:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt) |
Hi,
When trying to put some JS code in an Org file (to be published), I did it
that way:
#+begin_html
<div id="disqus_thread"></div>
<script type="text/javascript">
(function() {
var dsq = document.createElement('script'); dsq.type =
'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
#+end_html
But the [0] gets interpreted as a footnote... which is not found, hence an
error on the page, and the JS code is not usable.
The workaround is really easy for now:
#+HTML:<div id="disqus_thread"></div>
#+HTML:<script type="text/javascript">
#+HTML: (function() {
#+HTML: var dsq = document.createElement('script'); dsq.type =
'text/javascript'; dsq.async = true;
#+HTML: dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
#+HTML: (document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(dsq);
#+HTML: })();
#+HTML:</script>
But I wanted to report this finding.
Best regards,
Seb
--
Sébastien Vauban
- [O] [Bug] Verbatim code gets interpreted,
Sébastien Vauban <=