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
f19595ce
Commit
f19595ce
authored
Jan 04, 2015
by
Leonardo Braga
Committed by
Oleg Gaidarenko
Jan 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Core: add support to tag-hyphenated elements
Ref #1987 Ref 534f13025aeb59a7d5893ce62efafa0b066a4934
parent
abfb10c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
rsingleTag.js
src/core/var/rsingleTag.js
+1
-1
core.js
test/unit/core.js
+13
-0
No files found.
src/core/var/rsingleTag.js
View file @
f19595ce
define
(
function
()
{
define
(
function
()
{
// Match a standalone tag
// Match a standalone tag
return
(
/^<
(
\w
+
)\s
*
\/?
>
(?:
<
\/\1
>|
)
$/
);
return
(
/^<
(
[\w
-
]
+
)\s
*
\/?
>
(?:
<
\/\1
>|
)
$/
);
});
});
test/unit/core.js
View file @
f19595ce
...
@@ -599,6 +599,19 @@ test("jQuery('html')", function() {
...
@@ -599,6 +599,19 @@ test("jQuery('html')", function() {
equal
(
jQuery
(
"
\\
<div
\\
>"
).
length
,
0
,
"Ignore escaped html characters"
);
equal
(
jQuery
(
"
\\
<div
\\
>"
).
length
,
0
,
"Ignore escaped html characters"
);
});
});
test
(
"jQuery(tag-hyphenated elements) gh-1987"
,
function
()
{
expect
(
17
);
jQuery
.
each
(
"thead tbody tfoot colgroup caption tr th td"
.
split
(
" "
),
function
(
i
,
name
)
{
var
j
=
jQuery
(
"<"
+
name
+
"-d></"
+
name
+
"-d>"
);
ok
(
j
[
0
],
"Create a tag-hyphenated elements"
);
ok
(
jQuery
.
nodeName
(
j
[
0
],
name
.
toUpperCase
()
+
"-D"
),
"Tag-hyphenated element has expected node name"
);
});
var
j
=
jQuery
(
"<tr-multiple-hyphens></tr-multiple-hyphens>"
);
ok
(
jQuery
.
nodeName
(
j
[
0
],
"TR-MULTIPLE-HYPHENS"
),
"Element with multiple hyphens in its tag has expected node name"
);
});
test
(
"jQuery('massive html #7990')"
,
function
()
{
test
(
"jQuery('massive html #7990')"
,
function
()
{
expect
(
3
);
expect
(
3
);
...
...
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