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
d7438999
Commit
d7438999
authored
Feb 06, 2010
by
jeresig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that &#...; entities are encoded properly. Fixes #6042.
parent
54bd004e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
manipulation.js
src/manipulation.js
+1
-1
manipulation.js
test/unit/manipulation.js
+4
-1
No files found.
src/manipulation.js
View file @
d7438999
...
@@ -4,7 +4,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
...
@@ -4,7 +4,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rselfClosing
=
/^
(?:
area|br|col|embed|hr|img|input|link|meta|param
)
$/i
,
rselfClosing
=
/^
(?:
area|br|col|embed|hr|img|input|link|meta|param
)
$/i
,
rtagName
=
/<
([\w
:
]
+
)
/
,
rtagName
=
/<
([\w
:
]
+
)
/
,
rtbody
=
/<tbody/i
,
rtbody
=
/<tbody/i
,
rhtml
=
/<|&
\w
+;/
,
rhtml
=
/<|&
#
?
\w
+;/
,
rnocache
=
/<script|<object|<embed/i
,
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
)
{
...
...
test/unit/manipulation.js
View file @
d7438999
...
@@ -851,7 +851,7 @@ test("clone() on XML nodes", function() {
...
@@ -851,7 +851,7 @@ test("clone() on XML nodes", function() {
}
}
var
testHtml
=
function
(
valueObj
)
{
var
testHtml
=
function
(
valueObj
)
{
expect
(
2
4
);
expect
(
2
6
);
jQuery
.
scriptorder
=
0
;
jQuery
.
scriptorder
=
0
;
...
@@ -868,6 +868,9 @@ var testHtml = function(valueObj) {
...
@@ -868,6 +868,9 @@ var testHtml = function(valueObj) {
equals
(
div
.
children
().
length
,
2
,
"Make sure two child nodes exist."
);
equals
(
div
.
children
().
length
,
2
,
"Make sure two child nodes exist."
);
equals
(
div
.
children
().
children
().
length
,
1
,
"Make sure that a grandchild exists."
);
equals
(
div
.
children
().
children
().
length
,
1
,
"Make sure that a grandchild exists."
);
equals
(
jQuery
(
"<div/>"
).
html
(
valueObj
(
" "
))[
0
].
innerHTML
,
" "
,
"Make sure entities are passed through correctly."
);
equals
(
jQuery
(
"<div/>"
).
html
(
valueObj
(
"&"
))[
0
].
innerHTML
,
"&"
,
"Make sure entities are passed through correctly."
);
reset
();
reset
();
// using contents will get comments regular, text, and comment nodes
// using contents will get comments regular, text, and comment nodes
var
j
=
jQuery
(
"#nonnodes"
).
contents
();
var
j
=
jQuery
(
"#nonnodes"
).
contents
();
...
...
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