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
00a05ad9
Commit
00a05ad9
authored
Feb 25, 2011
by
cmcnulty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#6782 - optimized regex to allow more html snippets to user innerHTML
parent
71bd828d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
manipulation.js
src/manipulation.js
+2
-1
No files found.
src/manipulation.js
View file @
00a05ad9
...
@@ -6,6 +6,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
...
@@ -6,6 +6,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rtagName
=
/<
([\w
:
]
+
)
/
,
rtagName
=
/<
([\w
:
]
+
)
/
,
rtbody
=
/<tbody/i
,
rtbody
=
/<tbody/i
,
rhtml
=
/<|&#
?\w
+;/
,
rhtml
=
/<|&#
?\w
+;/
,
rnoInnerhtml
=
/<
(?:
script|style
)
/i
,
rnocache
=
/<
(?:
script|object|embed|option|style
)
/i
,
rnocache
=
/<
(?:
script|object|embed|option|style
)
/i
,
// checked="checked" or checked
// checked="checked" or checked
rchecked
=
/checked
\s
*
(?:[^
=
]
|=
\s
*.checked.
)
/i
,
rchecked
=
/checked
\s
*
(?:[^
=
]
|=
\s
*.checked.
)
/i
,
...
@@ -199,7 +200,7 @@ jQuery.fn.extend({
...
@@ -199,7 +200,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"
&&
!
rno
cache
.
test
(
value
)
&&
}
else
if
(
typeof
value
===
"string"
&&
!
rno
Innerhtml
.
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
()
]
)
{
...
...
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