mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Revert "Adjust jQuery('html') detection to only match when html starts with '<' (counting space characters). Fixes #11290"
This reverts commit 239fc86b01.
The consensus is that this would change behavior too abruptly. We will warn in 1.8 and do this in 1.9.
This commit is contained in:
@@ -40,8 +40,9 @@ var
|
||||
trimRight = /\s+$/,
|
||||
|
||||
// A simple way to check for HTML strings
|
||||
// If starts-with '<'
|
||||
rhtmlString = /^\s*(<[\w\W]+>)[^>]*$/,
|
||||
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
||||
// Ignore html if within quotes "" '' or brackets/parens [] ()
|
||||
rhtmlString = /^(?:[^#<\\]*(<[\w\W]+>)(?![^\[]*\])(?![^\(]*\))(?![^']*')(?![^"]*")[^>]*$)/,
|
||||
|
||||
// Match a standalone tag
|
||||
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
|
||||
|
||||
Reference in New Issue
Block a user