Skip to content

Commit

Permalink
Check for #8984 wasn't strong enough, enhanced.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed May 2, 2011
1 parent 6c449fd commit ca338dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];

Expand Down

0 comments on commit ca338dc

Please sign in to comment.