cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wilder-Smith <...@cast.org>
Subject HTML Generator
Date Fri, 18 Jun 2004 13:41:53 GMT
I've been using the HTML Generator at the top of a pipeline to
dynamically reprocess some HTML.  It turns out that an interaction
between JTidy and the DOM Streamer used in HTMLGenerator cause some
problems. JTidy treats the content of a <script> element as CDATA (it
doesn't further parse the content) and DOMStreamer then escapes
characters like '<', '&', etc.  The typical comments around javascript
e.g.

<script ...>
  <!--
     function foo() {
       ...
     }
  //-->
</script>

leave you with 

<script ...>
   &lt--
     function foo() {
       ...
     }
  //--&gt;
</script>

This breaks the javascript and causes all sorts of havoc.  It looks like
the two options are either fix JTidy (which seems to have not been
touched for around 4 years) or write a transform to undo the effects of
the interaction.

Has anyone else run into this problem?  Any thoughts will be
appreciated.

Thanks,

Chris

-- 
Chris Wilder-Smith
Principal Technical Architect

mailto:cws@cast.org             http://www.cast.org
CAST: 781-245-2212              
AIM:  ChrisWSAtWork             ICQ: 95325318


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message