Scott Wilson
-
2015-05-12
- Group: --> 2.12
<script src=....></script> would get transformed to <script src=...><[CDATA[]]></script> (as would an empty style element )
this is the change to XmlSerializer:
/\*\* \* encapsulate content with <\[CDATA\[ \]\]> for things like script and style elements \* @param tagNode \* @return true if <\[CDATA\[ \]\]> should be used. \*/ protected boolean dontEscape\(TagNode tagNode\) \{ // make sure <script src=..></script> doesn't get turned into <script src=..><\[CDATA\[\]\]></script> // TODO check for blank content as well. return props.isUseCdataForScriptAndStyle\(\) && isScriptOrStyle\(tagNode\) && \!tagNode.getChildren\(\).isEmpty\(\); \}
I have a test too.. but don't want to spend the time on trying to create a partial patch