mirror of
https://github.com/jquery/sizzle.git
synced 2025-12-28 04:43:44 +00:00
Selector: Detect incorrect escape handling by old Firefox
According to: https://www.w3.org/TR/css-syntax-3/#ident-token-diagram the escape doesn't need to be followed by a whitespace only if it's not a hex digit or a newline. However, old Firefox (3.6 - 5 only) doesn't throw if an escaped newline is not followed by a space. Fallback to Sizzle in such cases. Fixes gh-454 Closes gh-456
This commit is contained in:
parent
5d90d4fc09
commit
11767a18f7
8
dist/sizzle.js
vendored
8
dist/sizzle.js
vendored
@ -6,7 +6,7 @@
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2019-07-02
|
||||
* Date: 2019-08-20
|
||||
*/
|
||||
( function( window ) {
|
||||
var i,
|
||||
@ -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( "\\\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( ",.*:" );
|
||||
|
||||
2
dist/sizzle.min.js
vendored
2
dist/sizzle.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/sizzle.min.map
vendored
2
dist/sizzle.min.map
vendored
File diff suppressed because one or more lines are too long
@ -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( "\\\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( ",.*:" );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user