aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-04-12 16:39:30 -0400
committerJohn Resig <jeresig@gmail.com>2011-04-12 16:39:30 -0400
commit3418f323876043db63a2da9f653e51d5458647fa (patch)
tree144b7aa0fe4e07ce63385981a68db736124e4e4a /src
parent122514a8da8f214dc3e7b7b17defdbff862e8748 (diff)
parentdf7dfc2404807dce2f97c21782eb3a14ced86d6b (diff)
downloadjquery-3418f323876043db63a2da9f653e51d5458647fa.tar.gz
jquery-3418f323876043db63a2da9f653e51d5458647fa.zip
Merge branch 'master' of https://github.com/rjgotten/jquery into rjgotten-master. Also added in unit tests covering the case. Fixes #6180.
Conflicts: src/manipulation.js
Diffstat (limited to 'src')
-rw-r--r--src/manipulation.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index 758cdbae0..52d59d83e 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -9,6 +9,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rnocache = /<(?:script|object|embed|option|style)/i,
// checked="checked" or checked
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /\/(java|ecma)script/i,
wrapMap = {
option: [ 1, "<select multiple='multiple'>", "</select>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ],
@@ -635,7 +636,11 @@ jQuery.extend({
} else {
if ( ret[i].nodeType === 1 ) {
- ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
+ var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), function( elem ) {
+ return !elem.type || rscriptType.test( elem.type );
+ });
+
+ ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
}
fragment.appendChild( ret[i] );
}