Skip to content

Commit 5a64d25

Browse files
evilpiemoz-wptsync-bot
authored andcommitted
Sanitizer: Always allow the new canonical form in allowElement.
Differential Revision: https://phabricator.services.mozilla.com/D266658 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1991098 gecko-commit: d8ce384e2a5154e1f98210ed44a483101bfe66cd gecko-reviewers: smaug
1 parent 6eabc01 commit 5a64d25

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sanitizer-api/sanitizer-modifiers.tentative.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@
517517
replaceWithChildrenElements: []
518518
});
519519

520-
// If element["attributes"] or element["removeAttributes"] exists:
520+
// If element["attributes"] exists or element["removeAttributes"] with default « » is not empty:
521521
// The user agent may report a warning to the console that this operation is not supported.
522522
// Return false.
523523
assert_false(s.allowElement({name: "a", attributes: ["dir"]}));
@@ -535,8 +535,7 @@
535535
removeElements: ["a"],
536536
replaceWithChildrenElements: []
537537
});
538-
539-
assert_true(s.allowElement("a"));
538+
assert_true(s.allowElement({name: "a", removeAttributes: [] }));
540539
assert_config(s.get(), {
541540
removeElements: [],
542541
replaceWithChildrenElements: []

0 commit comments

Comments
 (0)