Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
f9417b9d
Commit
f9417b9d
authored
Feb 01, 2010
by
jeresig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Same problem happens with plain embed elements as well. Follow-up fix to #5904.
parent
1b28bba4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
manipulation.js
src/manipulation.js
+4
-4
No files found.
src/manipulation.js
View file @
f9417b9d
...
@@ -5,6 +5,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
...
@@ -5,6 +5,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rtagName
=
/<
([\w
:
]
+
)
/
,
rtagName
=
/<
([\w
:
]
+
)
/
,
rtbody
=
/<tbody/i
,
rtbody
=
/<tbody/i
,
rhtml
=
/<|&
\w
+;/
,
rhtml
=
/<|&
\w
+;/
,
rnocache
=
/<script|<object|<embed/i
,
rchecked
=
/checked
\s
*
(?:[^
=
]
|=
\s
*.checked.
)
/i
,
// checked="checked" or checked (html5)
rchecked
=
/checked
\s
*
(?:[^
=
]
|=
\s
*.checked.
)
/i
,
// checked="checked" or checked (html5)
fcloseTag
=
function
(
all
,
front
,
tag
)
{
fcloseTag
=
function
(
all
,
front
,
tag
)
{
return
rselfClosing
.
test
(
tag
)
?
return
rselfClosing
.
test
(
tag
)
?
...
@@ -226,7 +227,7 @@ jQuery.fn.extend({
...
@@ -226,7 +227,7 @@ jQuery.fn.extend({
null
;
null
;
// See if we can take a shortcut and just use innerHTML
// See if we can take a shortcut and just use innerHTML
}
else
if
(
typeof
value
===
"string"
&&
!
/<script|<object/i
.
test
(
value
)
&&
}
else
if
(
typeof
value
===
"string"
&&
!
rnocache
.
test
(
value
)
&&
(
jQuery
.
support
.
leadingWhitespace
||
!
rleadingWhitespace
.
test
(
value
))
&&
(
jQuery
.
support
.
leadingWhitespace
||
!
rleadingWhitespace
.
test
(
value
))
&&
!
wrapMap
[
(
rtagName
.
exec
(
value
)
||
[
""
,
""
])[
1
].
toLowerCase
()
]
)
{
!
wrapMap
[
(
rtagName
.
exec
(
value
)
||
[
""
,
""
])[
1
].
toLowerCase
()
]
)
{
...
@@ -389,11 +390,10 @@ function buildFragment( args, nodes, scripts ) {
...
@@ -389,11 +390,10 @@ function buildFragment( args, nodes, scripts ) {
// Only cache "small" (1/2 KB) strings that are associated with the main document
// Only cache "small" (1/2 KB) strings that are associated with the main document
// Cloning options loses the selected state, so don't cache them
// Cloning options loses the selected state, so don't cache them
// IE 6 doesn't like it when you put <object> elements in a fragment
// IE 6 doesn't like it when you put <object>
or <embed>
elements in a fragment
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
if
(
args
.
length
===
1
&&
typeof
args
[
0
]
===
"string"
&&
args
[
0
].
length
<
512
&&
doc
===
document
&&
if
(
args
.
length
===
1
&&
typeof
args
[
0
]
===
"string"
&&
args
[
0
].
length
<
512
&&
doc
===
document
&&
args
[
0
].
indexOf
(
"<option"
)
<
0
&&
args
[
0
].
indexOf
(
"<object"
)
<
0
&&
!
rnocache
.
test
(
args
[
0
]
)
&&
(
jQuery
.
support
.
checkClone
||
!
rchecked
.
test
(
args
[
0
]
))
)
{
(
jQuery
.
support
.
checkClone
||
!
rchecked
.
test
(
args
[
0
]
))
)
{
cacheable
=
true
;
cacheable
=
true
;
cacheresults
=
jQuery
.
fragments
[
args
[
0
]
];
cacheresults
=
jQuery
.
fragments
[
args
[
0
]
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment