Commit ca338dc7 authored by John Resig's avatar John Resig

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

parent 6c449fd5
...@@ -96,7 +96,7 @@ jQuery.fn = jQuery.prototype = { ...@@ -96,7 +96,7 @@ jQuery.fn = jQuery.prototype = {
// Handle HTML strings // Handle HTML strings
if ( typeof selector === "string" ) { if ( typeof selector === "string" ) {
// Are we dealing with HTML string or an ID? // 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 // Assume that strings that start and end with <> are HTML and skip the regex check
match = [ null, selector, null ]; match = [ null, selector, null ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment