Restore rhtmlString to its original form. 1.9 will come with starts-with html matching. For now, we are warning against broad use of jQuery() to parse html.

This commit is contained in:
timmywil
2012-06-20 16:22:36 -04:00
parent c20e031058
commit 6cdca88eee
2 changed files with 6 additions and 7 deletions

View File

@@ -41,8 +41,7 @@ var
// A simple way to check for HTML strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
// Ignore html if within quotes "" '' or brackets/parens [] ()
rhtmlString = /^(?:[^#<\\]*(<[\w\W]+>)(?![^\[]*\])(?![^\(]*\))(?![^']*')(?![^"]*")[^>]*$)/,
rhtmlString = /^(?:[^#<]*(<[\w\W]+>)[^>]*$)/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,