mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 04:45:04 -05:00
Manipulation: Bring tagname regexes up to spec
Fixes gh-2005 Closes gh-2634
This commit is contained in:
committed by
Richard Gibson
parent
df822caff0
commit
fb9472c7fb
@@ -1,5 +1,5 @@
|
||||
define( function() {
|
||||
|
||||
// Match a standalone tag
|
||||
return ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
|
||||
return ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
||||
} );
|
||||
|
||||
@@ -27,7 +27,7 @@ define( [
|
||||
dataPriv, dataUser, acceptData, DOMEval ) {
|
||||
|
||||
var
|
||||
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
|
||||
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
|
||||
|
||||
// Support: IE 10-11, Edge 10240+
|
||||
// In IE/Edge using regex groups here causes severe slowdowns.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
define( function() {
|
||||
return ( /<([\w:-]+)/ );
|
||||
return ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user