cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "julien bloit" <Julien.Bl...@ircam.fr>
Subject Re: Comments escaped in serializer
Date Mon, 28 Apr 2003 16:02:54 GMT
Hi Anna,

    Have you tried putting your javascript inside CDATA tags?

<script type="text/ecmascript"> <![CDATA[
// there goes your script
]]></script>

Might work..
  ----- Original Message ----- 
  From: Anna Afonchenko 
  To: cocoon-users 
  Sent: Monday, April 28, 2003 4:22 PM
  Subject: Comments escaped in serializer


  Hi all.
  I am trying to construct a pipeline that will get in some online page and present it.
  The page got some scripts like:
  <script type="text/javascript">
      <!--
          javascript code
      //-->
  </script>

  Now here is my problem. If I serialize the page as html, everything is fine.
  But when I try to serialize the same page as xml or xhtml, the
  scripts stop working. I think that I know the reason for this.
  When serializing the page as xhtml, the comment < and > signs inside script
  are turned into entities &lt; and &gt;. When the page serialized as html the comments
stay valid.

  How could I set it up to output the comments < and > signs not as entities when serializing
as xml/xhtml?
  Is it possible in cocoon or do I have to write some patch?

  Thank you very much for help.

  Anna
Mime
View raw message