Fix #13223. Re-allow leading space in HTML. Close gh-1264.

(cherry picked from commit 00eafdf028)
This commit is contained in:
Dave Methvin
2013-05-08 21:07:41 -04:00
parent c9267ab078
commit 9fdbc8bf33
3 changed files with 8 additions and 14 deletions

View File

@@ -52,7 +52,7 @@ var
// A simple way to check for HTML strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
// Strict HTML recognition (#11290: must start with <)
rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,