CDATA seems to be the standard way both to get XHTML to validate with Javascript and to tell XML parsers to treat Javascript as character data. I've rolled a patch that simply adds CDATA start and end tags within the script tags printed by swfobject_api. This is also useful for sites using search engines that strip out XML tags, because it allows them to strip out javascript code as well.

CommentFileSizeAuthor
cdata.patch1.48 KBtmcw

Comments

arthurf’s picture

Status: Active » Closed (fixed)

javascript is now being output by Drupal (using drupal_add_js()) so I think this issue should be moot. If it is not, please feel free to reopen this issue.