mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Adjust jQuery('html') detection to only match when html starts with '<' (not counting space characters). Fixes #11290.
This commit is contained in:
@@ -49,7 +49,8 @@ var
|
||||
|
||||
// A simple way to check for HTML strings
|
||||
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
||||
rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
|
||||
// Strict HTML recognition (#11290: must start with <)
|
||||
rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
|
||||
|
||||
// Match a standalone tag
|
||||
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
|
||||
|
||||
Reference in New Issue
Block a user