From ca338dc749971ee2c16312027280f76b64b90838 Mon Sep 17 00:00:00 2001 From: John Resig Date: Mon, 2 May 2011 13:31:23 -0400 Subject: [PATCH] Check for #8984 wasn't strong enough, enhanced. --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 7eb0e0b11..056fb88fb 100644 --- a/src/core.js +++ b/src/core.js @@ -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 ]; -- 2.39.5