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

Commit62b9a25

Browse files
authored
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)
1 parent67cb1af commit62b9a25

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
@@ -1474,7 +1474,7 @@ QUnit.test( "pseudo - :target and :root", function( assert ) {
14741474
});
14751475

14761476
QUnit.test("pseudo - :lang",function(assert){
1477-
assert.expect(QUnit.jQuerySelectors ?105 :55);
1477+
assert.expect(QUnit.jQuerySelectors ?104 :54);
14781478

14791479
vardocElem=document.documentElement,
14801480
docXmlLang=docElem.getAttribute("xml:lang"),
@@ -1547,8 +1547,18 @@ QUnit.test( "pseudo - :lang", function( assert ) {
15471547
anchor.parentNode.lang="ara";
15481548
anchor.lang="ara\\b";
15491549
assert.deepEqual(jQuery(":lang(ara\\b)",foo).get(),[],":lang respects backslashes");
1550-
assert.deepEqual(jQuery(":lang(ara\\\\b)",foo).get(),[anchor],
1551-
":lang respects escaped backslashes");
1550+
1551+
// Support: Firefox 114+
1552+
// Firefox 114+ no longer match on backslashes in `:lang()`, even when escaped.
1553+
// It is an intentional change as `:lang()` parameters are supposed to be valid
1554+
// BCP 47 strings. Therefore, we won't attempt to patch it.
1555+
// We'll keep this test here until other browsers match the behavior.
1556+
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1839747#c1
1557+
// See https://github.com/w3c/csswg-drafts/issues/8720#issuecomment-1509242961
1558+
//
1559+
// assert.deepEqual( jQuery( ":lang(ara\\\\b)", foo ).get(), [ anchor ],
1560+
// ":lang respects escaped backslashes" );
1561+
15521562
assert.throws(function(){
15531563
jQuery("#qunit-fixture:lang(c++)");
15541564
},":lang value must be a valid identifier");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp