Skip to content
Permalink
Browse files

Check for #8984 wasn't strong enough, enhanced.

  • Loading branch information...
jeresig committed May 2, 2011
1 parent 6c449fd commit ca338dc749971ee2c16312027280f76b64b90838
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 ];

0 comments on commit ca338dc

Please sign in to comment.
You can’t perform that action at this time.