commit 49957c69c2940c2f15ce106eb94fe3004f88a2c6 parent 657843bb1061c884f6324ab7e8a3215fbe97230e Author: Tom Schuster <tschuster@mozilla.com> Date: Wed, 29 Oct 2025 15:19:25 +0000 Bug 1997085 - Sanitizer: Remove rel attribute from a element. r=freddyb Implements https://github.com/WICG/sanitizer-api/pull/346 Differential Revision: https://phabricator.services.mozilla.com/D270492 Diffstat:
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dom/security/sanitizer/SanitizerDefaultConfig.h b/dom/security/sanitizer/SanitizerDefaultConfig.h @@ -7,7 +7,6 @@ // This file is automatically generated by update-safe-default-configuration.py -#include "SanitizerDefaultConfig.h" #include "mozilla/dom/SanitizerTypes.h" #include "nsGkAtoms.h" @@ -217,7 +216,6 @@ constexpr nsStaticAtom* kHTMLElementWithAttributes[] = { /* element */ nsGkAtoms::a, nsGkAtoms::href, nsGkAtoms::hreflang, - nsGkAtoms::rel, nsGkAtoms::type, nullptr, /* element */ nsGkAtoms::blockquote, diff --git a/dom/security/sanitizer/safe-default-configuration.json b/dom/security/sanitizer/safe-default-configuration.json @@ -255,10 +255,6 @@ "namespace": null }, { - "name": "rel", - "namespace": null - }, - { "name": "type", "namespace": null } diff --git a/dom/security/sanitizer/update-safe-default-configuration.py b/dom/security/sanitizer/update-safe-default-configuration.py @@ -5,7 +5,7 @@ import json from urllib.request import urlretrieve -REVISION = "fc36ba125ff6f175e1b5619c4ec20ab611cc5858" +REVISION = "62b91240be04c9c35302fef471216e8f330b0390" urlretrieve( f"https://raw.githubusercontent.com/WICG/sanitizer-api/{REVISION}/builtins/safe-default-configuration.json", @@ -108,7 +108,6 @@ out.write( // This file is automatically generated by update-safe-default-configuration.py #include "mozilla/dom/SanitizerTypes.h" -#include "SanitizerDefaultConfig.h" #include "nsGkAtoms.h" namespace mozilla::dom::sanitizer {{ diff --git a/testing/web-platform/tests/sanitizer-api/sethtml-tree-construction.sub.dat b/testing/web-platform/tests/sanitizer-api/sethtml-tree-construction.sub.dat @@ -646,3 +646,9 @@ test<div>p</div>tt<p>div</p><test>test</test> | content | "Hello" +#data +<a href="about:blank" rel="opener">Click.</a> +#document +| <a> +| href="about:blank" +| "Click."