[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] turn off inclusion of JavaScript helper code?
From: |
Sebastian Rose |
Subject: |
Re: [Orgmode] turn off inclusion of JavaScript helper code? |
Date: |
Wed, 21 Apr 2010 00:22:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Stefan Vollmar <address@hidden> writes:
> Hello,
>
> in our org-mode generated HTML pages we find these snippets:
>
> <script type="text/javascript">
> <!--/*--><![CDATA[/*><!--*/
> function CodeHighlightOn(elem, id)
> { ...
> }
> function CodeHighlightOff(elem, id)
> { ...
> }
> /*]]>*///-->
> </script>
>
> We have just noticed that MS Internet Explorer complains that these
> lines pose a security risk (Firefox and Safari have no problem with
> them), deleting the JavaScript code solves the issue. I have found a
> link that might explain the problem:
> http://www.codingforums.com/archive/index.php/t-78039.html
>
> (the problem is limited to locally accessed HTML pages, not HTML
> content that is accessed over a network; we now use org-mode to
> generate a locally stored collection of online help files in HTML - so
> this is an awkward issue for us)
M-x customize-variable RET org-export-html-style-include-scripts
You can turn the inclusion off in your `org-export-projects-alist':
:style-include-scripts nil
>
> As our pages do not need this JavaScript code anyway, having a switch that
> prevents this code from being included would be a good solution from our
> point of view. Naturally, we could have a "postprocessing" script to remove
> the offending lines before releasing the HTML content, however, that seems
> such a crude approach.
>
> Here is a suggestion, maybe there could be a new switch for #+OPTIONS:
>
> javascript: turn on/off inclusion of JavaScript helper code for code
> highlighting
>
> and while we are at it:
>
> css: turn on/off inclusion of stylesheet?
M-x customize-variable org-export-html-style-include-default RET
And per project in `org-export-projects-alist':
:style-include-default nil
HTH
Sebastian