emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* turn off inclusion of JavaScript helper code?
@ 2010-04-20 20:31 Stefan Vollmar
  2010-04-20 22:22 ` Sebastian Rose
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Vollmar @ 2010-04-20 20:31 UTC (permalink / raw)
  To: mailing-list-org-mode Mode


[-- Attachment #1.1: Type: text/plain, Size: 1678 bytes --]

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)

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?

Warm regards,
 Stefan
-- 
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
Email: vollmar@nf.mpg.de   http://www.nf.mpg.de







[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5513 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: turn off inclusion of JavaScript helper code?
  2010-04-20 20:31 turn off inclusion of JavaScript helper code? Stefan Vollmar
@ 2010-04-20 22:22 ` Sebastian Rose
  2010-04-22  7:31   ` Stefan Vollmar
  2011-01-10 13:28   ` Andreas Rütten
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Rose @ 2010-04-20 22:22 UTC (permalink / raw)
  To: Stefan Vollmar; +Cc: mailing-list-org-mode Mode

Stefan Vollmar <vollmar@nf.mpg.de> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: turn off inclusion of JavaScript helper code?
  2010-04-20 22:22 ` Sebastian Rose
@ 2010-04-22  7:31   ` Stefan Vollmar
  2011-01-10 13:28   ` Andreas Rütten
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Vollmar @ 2010-04-22  7:31 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: mailing-list-org-mode Mode


[-- Attachment #1.1: Type: text/plain, Size: 589 bytes --]

Dear Sebastian,

On 21.04.2010, at 00:22, Sebastian Rose wrote:

> You can turn the inclusion off in your `org-export-projects-alist':
> 
>    :style-include-scripts nil
[...]
> 
>   :style-include-default nil

solves my problem beautifully - thank you!

Warm regards,
 Stefan
-- 
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
Email: vollmar@nf.mpg.de   http://www.nf.mpg.de







[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5513 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: turn off inclusion of JavaScript helper code?
  2010-04-20 22:22 ` Sebastian Rose
  2010-04-22  7:31   ` Stefan Vollmar
@ 2011-01-10 13:28   ` Andreas Rütten
  2011-01-10 17:08     ` Andreas Rütten
  2011-01-10 17:10     ` Andreas Rütten
  1 sibling, 2 replies; 6+ messages in thread
From: Andreas Rütten @ 2011-01-10 13:28 UTC (permalink / raw)
  To: emacs-orgmode

Sebastian Rose <sebastian_rose <at> gmx.de> writes:

> 
> Stefan Vollmar <vollmar <at> nf.mpg.de> 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
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode <at> gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> 

Hy,

I have "(setq org-export-html-style-include-scripts nil)" in my init.el and also
":style-include-scripts nil" in my "org-publish-project-alist" configuration. 

But I still get these javascript 

<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
[...]
/*]]>*///-->
</script>

part in my exported html files.

Any further ideas how I can get rid of them?

My Org-mode version is 7.3 (release_7.4.153.ga0b8)


Regards,
Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: turn off inclusion of JavaScript helper code?
  2011-01-10 13:28   ` Andreas Rütten
@ 2011-01-10 17:08     ` Andreas Rütten
  2011-01-10 17:10     ` Andreas Rütten
  1 sibling, 0 replies; 6+ messages in thread
From: Andreas Rütten @ 2011-01-10 17:08 UTC (permalink / raw)
  To: emacs-orgmode

Am Mon, 10 Jan 2011 13:28:37 +0000 (UTC)
schrieb Andreas Rütten <AndreasRuetten@gmx.de>:

> Sebastian Rose <sebastian_rose <at> gmx.de> writes:
> 
> > 
> > Stefan Vollmar <vollmar <at> nf.mpg.de> 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
> > 
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode <at> gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> > 
> > 
> 
> Hy,
> 
> I have "(setq org-export-html-style-include-scripts nil)" in my
> init.el and also ":style-include-scripts nil" in my
> "org-publish-project-alist" configuration. 
> 
> But I still get these javascript 
> 
> <script type="text/javascript">
> <!--/*--><![CDATA[/*><!--*/
>  function CodeHighlightOn(elem, id)
> [...]
> /*]]>*///-->
> </script>
> 
> part in my exported html files.
> 
> Any further ideas how I can get rid of them?
> 
> My Org-mode version is 7.3 (release_7.4.153.ga0b8)
> 
> 
> Regards,
> Andreas
> 

I tried the same configuration with Org-mode version 7.3
(release_7.4.3.g76a2) and it works as expected. No embedded javascript.

-- 
Andreas Rütten
mailto : AndreasRuetten@gmx.de
PGP C1CC335C, A655 0268 CEA6 A3DA 30AA D356 A450 30BD C1CC 335C
--

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: turn off inclusion of JavaScript helper code?
  2011-01-10 13:28   ` Andreas Rütten
  2011-01-10 17:08     ` Andreas Rütten
@ 2011-01-10 17:10     ` Andreas Rütten
  1 sibling, 0 replies; 6+ messages in thread
From: Andreas Rütten @ 2011-01-10 17:10 UTC (permalink / raw)
  To: Emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 3314 bytes --]

Am Mon, 10 Jan 2011 13:28:37 +0000 (UTC)
schrieb Andreas Rütten <AndreasRuetten@gmx.de>:

> Sebastian Rose <sebastian_rose <at> gmx.de> writes:
> 
> > 
> > Stefan Vollmar <vollmar <at> nf.mpg.de> 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
> > 
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode <at> gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> > 
> > 
> 
> Hy,
> 
> I have "(setq org-export-html-style-include-scripts nil)" in my
> init.el and also ":style-include-scripts nil" in my
> "org-publish-project-alist" configuration. 
> 
> But I still get these javascript 
> 
> <script type="text/javascript">
> <!--/*--><![CDATA[/*><!--*/
>  function CodeHighlightOn(elem, id)
> [...]
> /*]]>*///-->
> </script>
> 
> part in my exported html files.
> 
> Any further ideas how I can get rid of them?
> 
> My Org-mode version is 7.3 (release_7.4.153.ga0b8)
> 
> 
> Regards,
> Andreas
> 
> 

I tried the same configuration with Org-mode version 7.3
(release_7.4.3.g76a2) and it works as expected. No embedded javascript.

-- 
Andreas Rütten
mailto : AndreasRuetten@gmx.de
PGP C1CC335C, A655 0268 CEA6 A3DA 30AA D356 A450 30BD C1CC 335C
--

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-10 17:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-20 20:31 turn off inclusion of JavaScript helper code? Stefan Vollmar
2010-04-20 22:22 ` Sebastian Rose
2010-04-22  7:31   ` Stefan Vollmar
2011-01-10 13:28   ` Andreas Rütten
2011-01-10 17:08     ` Andreas Rütten
2011-01-10 17:10     ` Andreas Rütten

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).