Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5aa7d93

Browse files
committed
Tests: Disable the ":lang respects escaped backslashes" test
Firefox 114+ no longer match on backslashes in `:lang()`, even when escaped.It is an intentional change as `:lang()` parameters are supposed to be validBCP 47 strings. Therefore, we won't attempt to patch it.We'll keep this test here until other browsers match the behavior.Fixesgh-5271Closesgh-5277Refhttps://bugzilla.mozilla.org/show_bug.cgi?id=1839747#c1Refw3c/csswg-drafts#8720 (comment)(cherry picked from commit62b9a25)
1 parent141518e commit5aa7d93

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

‎test/unit/selector.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ QUnit.test( "pseudo - :target and :root", function( assert ) {
15251525
});
15261526

15271527
QUnit.test("pseudo - :lang",function(assert){
1528-
assert.expect(QUnit.jQuerySelectors ?105 :55);
1528+
assert.expect(QUnit.jQuerySelectors ?104 :54);
15291529

15301530
vardocElem=document.documentElement,
15311531
docXmlLang=docElem.getAttribute("xml:lang"),
@@ -1598,8 +1598,18 @@ QUnit.test( "pseudo - :lang", function( assert ) {
15981598
anchor.parentNode.lang="ara";
15991599
anchor.lang="ara\\b";
16001600
assert.deepEqual(jQuery.find(":lang(ara\\b)",foo),[],":lang respects backslashes");
1601-
assert.deepEqual(jQuery.find(":lang(ara\\\\b)",foo),[anchor],
1602-
":lang respects escaped backslashes");
1601+
1602+
// Support: Firefox 114+
1603+
// Firefox 114+ no longer match on backslashes in `:lang()`, even when escaped.
1604+
// It is an intentional change as `:lang()` parameters are supposed to be valid
1605+
// BCP 47 strings. Therefore, we won't attempt to patch it.
1606+
// We'll keep this test here until other browsers match the behavior.
1607+
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1839747#c1
1608+
// See https://github.com/w3c/csswg-drafts/issues/8720#issuecomment-1509242961
1609+
//
1610+
// assert.deepEqual( jQuery.find( ":lang(ara\\\\b)", foo ), [ anchor ],
1611+
// ":lang respects escaped backslashes" );
1612+
16031613
assert.throws(function(){
16041614
jQuery.find("#qunit-fixture:lang(c++)");
16051615
},":lang value must be a valid identifier");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp