Fixes #11402. domManip now also removes the closing part of HTML comments or CDATA surrounding executed scripts. Unit tests added.

This commit is contained in:
jaubourg
2012-05-06 01:27:01 +02:00
parent e3cf0e220c
commit a743be19bd
3 changed files with 19 additions and 1 deletions

View File

@@ -29,7 +29,7 @@ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figca
// checked="checked" or checked
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rscriptType = /\/(java|ecma)script/i,
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,
wrapMap = {
option: [ 1, "<select multiple='multiple'>", "</select>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ],