How to strip out character references inserted by Diazo into text nodes
I'm using plone.app.theming 1.0b5 and Plone 4.1 rc3. Our Diazo rules contain an number of external content includes and we're using one such include to insert Google Analytics script into the result:
<append theme="/html/head" content="/html/head/script"
href="@@standard-page-elements" />
Unfortunately the script tag from the view is being mangled during the transform such that any carriage returns are converted to character references ( )
This is due to 开发者_开发问答the way lxml serializes and deserializes (see this Plone bug report).
I'd like a work around in the meantime but can't figure out a Diazo rule that would strip these references out.
As noted above:
The bug has been fixed in the trunk of Diazo (thanks Laurence) so I no longer need to do this. I didn't manage to figure it out: it doesn't seem to me you can alter external content through Diazo, only the main content.
精彩评论