Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🔒️ fix CVE-2012-6708
  • Loading branch information
ctcpip committed Feb 15, 2024
commit 8bdec180f21fc746f7e15a73672bd4568ac37c19
3 changes: 2 additions & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ var jQuery = window.jQuery = window.$ = function( selector, context ) {

// A simple way to check for HTML strings or ID strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
var quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
// Strict HTML recognition (#11290: must start with <)
var quickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,

// Is it a simple selector
isSimple = /^.[^:#\[\.]*$/,
Expand Down