diff options
Diffstat (limited to 'npm_assets/node_modules/jquery/src/manipulation.js')
| -rw-r--r-- | npm_assets/node_modules/jquery/src/manipulation.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/npm_assets/node_modules/jquery/src/manipulation.js b/npm_assets/node_modules/jquery/src/manipulation.js index dec21ea..aa215b6 100644 --- a/npm_assets/node_modules/jquery/src/manipulation.js +++ b/npm_assets/node_modules/jquery/src/manipulation.js @@ -40,7 +40,8 @@ var // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; + + rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g; // Prefer a tbody over its parent table for containing new rows function manipulationTarget( elem, content ) { @@ -154,7 +155,7 @@ function domManip( collection, args, callback, ignored ) { // Use the original fragment for the last item // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). + // being emptied incorrectly in certain situations (trac-8070). for ( ; i < l; i++ ) { node = fragment; @@ -195,6 +196,12 @@ function domManip( collection, args, callback, ignored ) { }, doc ); } } else { + + // Unwrap a CDATA section containing script contents. This shouldn't be + // needed as in XML documents they're already not visible when + // inspecting element contents and in HTML documents they have no + // meaning but we're preserving that logic for backwards compatibility. + // This will be removed completely in 4.0. See gh-4904. DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); } } |
