Skip to content

Commit ca338dc

Browse files
committed
Check for #8984 wasn't strong enough, enhanced.
1 parent 6c449fd commit ca338dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jQuery.fn = jQuery.prototype = {
9696
// Handle HTML strings
9797
if ( typeof selector === "string" ) {
9898
// Are we dealing with HTML string or an ID?
99-
if ( selector.charAt(0) === "<" || selector.charAt( selector.length - 1 ) === ">" ) {
99+
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
100100
// Assume that strings that start and end with <> are HTML and skip the regex check
101101
match = [ null, selector, null ];
102102

0 commit comments

Comments
 (0)