diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2018-07-13 00:35:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-13 00:35:08 -0400 |
commit | 979809c5a80aaf26bf7e3406a2e361e809f9b132 (patch) | |
tree | babadd2f2ae52f28417154787d0ef65669b4bdb2 /src/core | |
parent | cc95204589eff52eb4eb543134c56c4a3a84e50a (diff) | |
download | jquery-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/core')
-rw-r--r-- | src/core/var/rsingleTag.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/var/rsingleTag.js b/src/core/var/rsingleTag.js index 4d6e8a0ac..340b80db0 100644 --- a/src/core/var/rsingleTag.js +++ b/src/core/var/rsingleTag.js @@ -1,6 +1,7 @@ define( function() { "use strict"; - // Match a standalone tag + // rsingleTag matches a string consisting of a single HTML element with no attributes + // and captures the element's name return ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); } ); |