scarba05
scarba05

Reputation: 3001

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 (&#13;)

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.

Upvotes: 2

Views: 316

Answers (1)

Paul Sweatte
Paul Sweatte

Reputation: 24617

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.

Upvotes: 0

Related Questions