aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-05-02 13:31:23 -0400
committerJohn Resig <jeresig@gmail.com>2011-05-02 13:31:23 -0400
commitca338dc749971ee2c16312027280f76b64b90838 (patch)
tree1ce4d8421830b1b3b5b7f349a73b931b9faac8fb /src/core.js
parent6c449fd5df3e0ec50e893d055da9aea486e7d71c (diff)
downloadjquery-ca338dc749971ee2c16312027280f76b64b90838.tar.gz
jquery-ca338dc749971ee2c16312027280f76b64b90838.zip
Check for #8984 wasn't strong enough, enhanced.
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js2
1 files changed, 1 insertions, 1 deletions
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 ];