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

This commit is contained in:
Dave Methvin
2013-05-08 21:07:41 -04:00
parent 0135a223f4
commit 00eafdf028
3 changed files with 8 additions and 14 deletions

View File

@@ -55,7 +55,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>|)$/,