emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Javascript Export Issue


From: Sebastian Rose
Subject: Re: [Orgmode] Javascript Export Issue
Date: Sat, 07 Mar 2009 11:14:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

Hi Scott,


True. Safari needs this one here (note the two additional slashes in the
second last line):


<script type="text/javascript">
 <!--/*--><![CDATA[/*><!--*/
 THE SCRIPT
 /*]]>*///-->
</script>


Sorry. I'll search the org sources and compile a patch for this issue.



address@hidden writes:
> Greetings,
>
> When I export (using org-mode 6.23) to html an org file that has options for
> org-info.js, the html file contains this:
>
> <script type="text/javascript">
> <!--/*--><![CDATA[/*><!--*/
> THE SCRIPT
> /*]]>*/-->
> </script>
>
> Earlier versions of org-mode exported scripts this way:
>
> <script type="text/javascript">
> /* <![CDATA[ */
> THE SCRIPT
> /* ]]> */
> </script>
>
> Today, I discovered that the first script listed above will work with Firefox,
> but not with Safari (I don't know about IE). After some research, I discovered
> several fixes, including the old way of exporting, the easiest being:
>
> <script type="text/javascript">
> <!--
> THE SCRIPT
> -->
> </script>


This is not valid XHTML because of the missing `<![CDATA[' tags. XML
parsers will stop when reading the JavaScript code.




>
> I realize there are issues here with the differences between html browsers and
> xml browsers, so I've decided that I would like to have scripts (and styles)
> exported as separate files. Is this possible?
>
> When I export my org file to html, the html file contains one style section 
> and
> two script sections. If these three were instead exported to separate files,
> that would eliminate the need to worry about how to enclose styles and scripts
> with comments in a way that works for all browsers. Of course, then org-mode
> would be creating four files instead of one, but I would like to have this
> option. Everything I've read about this matter recommends keeping styles and
> scripts as external files.
>
> When I create the three files manually and edit the html file appropriately, 
> the
> html file lacks all the style and script code which is replaced by:
>
> <link rel="stylesheet" type="text/css" href="gen-style.css">
> <link rel="stylesheet" type="text/css" href="style.css">
> <script type="text/javascript" src="org-info.v.0.1.0.5.js"></script>
> <script type="text/javascript" src="org-html.js"></script>
> <script type="text/javascript" src="mystery.js"></script>


Good idea.
But this should be valid XHTML too:

<link rel="stylesheet" type="text/css" href="gen-style.css" />
<link rel="stylesheet" type="text/css" href="style.css" />


Regards,


-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: address@hidden, address@hidden
Http:  www.emma-stil.de




reply via email to

[Prev in Thread] Current Thread [Next in Thread]