We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c70c7ba commit 8bdec18Copy full SHA for 8bdec18
src/core.js
@@ -21,7 +21,8 @@ var jQuery = window.jQuery = window.$ = function( selector, context ) {
21
22
// A simple way to check for HTML strings or ID strings
23
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
24
-var quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+// Strict HTML recognition (#11290: must start with <)
25
+var quickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
26
27
// Is it a simple selector
28
isSimple = /^.[^:#\[\.]*$/,
0 commit comments