aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2018-07-13 00:35:08 -0400
committerGitHub <noreply@github.com>2018-07-13 00:35:08 -0400
commit979809c5a80aaf26bf7e3406a2e361e809f9b132 (patch)
treebabadd2f2ae52f28417154787d0ef65669b4bdb2 /src/manipulation
parentcc95204589eff52eb4eb543134c56c4a3a84e50a (diff)
downloadjquery-979809c5a80aaf26bf7e3406a2e361e809f9b132.tar.gz
jquery-979809c5a80aaf26bf7e3406a2e361e809f9b132.zip
Manipulation: Properly detect HTML elements with single-character names
Fixes gh-4124 Closes gh-4125
Diffstat (limited to 'src/manipulation')
-rw-r--r--src/manipulation/var/rtagName.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/manipulation/var/rtagName.js b/src/manipulation/var/rtagName.js
index d565dd3de..7435620c1 100644
--- a/src/manipulation/var/rtagName.js
+++ b/src/manipulation/var/rtagName.js
@@ -1,5 +1,8 @@
define( function() {
"use strict";
- return ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );
+ // rtagName captures the name from the first start tag in a string of HTML
+ // https://html.spec.whatwg.org/multipage/syntax.html#tag-open-state
+ // https://html.spec.whatwg.org/multipage/syntax.html#tag-name-state
+ return ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
} );