Skip to content

Commit

Permalink
Selector: Detect incorrect escape handling by old Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
mgol committed Aug 19, 2019
1 parent 5d90d4f commit c181155
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sizzle.js
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,12 @@ setDocument = Sizzle.setDocument = function( node ) {
rbuggyQSA.push( ":enabled", ":disabled" );
}

// Support: Firefox <=3.6 - 5 only
// Old Firefox doesn't throw on a badly-escaped identifier.
el.querySelectorAll( "x\\\f" );
rbuggyQSA.push( "\\r", "\\n", "\\f" );

// Support: Opera 10 - 11 only
// Opera 10-11 does not throw on post-comma invalid pseudos
el.querySelectorAll( "*,:x" );
rbuggyQSA.push( ",.*:" );
Expand Down

0 comments on commit c181155

Please sign in to comment.