mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Check for #8984 wasn't strong enough, enhanced.
This commit is contained in:
parent
6c449fd5df
commit
ca338dc749
@ -96,7 +96,7 @@ jQuery.fn = jQuery.prototype = {
|
||||
// Handle HTML strings
|
||||
if ( typeof selector === "string" ) {
|
||||
// Are we dealing with HTML string or an ID?
|
||||
if ( selector.charAt(0) === "<" || selector.charAt( selector.length - 1 ) === ">" ) {
|
||||
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
|
||||
// Assume that strings that start and end with <> are HTML and skip the regex check
|
||||
match = [ null, selector, null ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user