racke/Template-Flute — pull request #10 by melmothx (2013-07-08 12:48:23+00:00)
Title: Attempt to fix #GH 6 (escaping inside script tags)

If the script is wrapped in CDATA, the closing CDATA tag will be
escaped. See bug https://rt.cpan.org/Public/Bug/Display.html?id=86773

When parsing the input html, for hook or template, loop over the found
script elements and set it "asis" (to be read "AS IS") to prevent
escaping.

This looks like a workaround, because the HTML->XML translator doesn't
seem to parse the CDATA section correctly. So we have on one side the
missing CDATA parsing (in TreeBuilder) and on the other side the Twig
bug which escape the end of the CDATA tag (]]>) even if it was told to
leave it AS IS.

For the common usage scenario, this should not be a problem, anyway, but
this needs to be kept in mind, as using CDATA will produce invalid
HTML (until the issue on the Twig side is fixed).