I am using a template with the following TAL:
<iframe tal:attributes="src view/src" />
where view.src returns a URL including a query string with ampersands.
The template renders this fine, but after going through Diazo the ampersands are escaped as &
How can I prevent Diazo from doing this?
The template is returning invalid HTML – outside of the CDATA script and style tags, ampersands should be encoded as entities (http://htmlhelp.com/tools/validator/problems.html#amp). The HTMLParser can guess what you mean, but the serializer encodes the data correctly on the way out and there is not way to avoid that.
Note that this is just the HTML encoding of data, to take an example:
The value of the iframe’s src attribute is
http://example.com?foo=1&baz=2.