Bug 1959727 - Add the sanitizer option to setHTMLUnsafe. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D247109
This commit is contained in:
Tom Schuster
2025-05-08 03:18:12 +00:00
committed by tschuster@mozilla.com
parent 1201316c8c
commit ae7f13512d
12 changed files with 131 additions and 48 deletions

View File

@@ -5493,10 +5493,12 @@ EditorBase* Element::GetExtantEditor() const {
}
void Element::SetHTMLUnsafe(const TrustedHTMLOrString& aHTML,
const SetHTMLUnsafeOptions& aOptions,
nsIPrincipal* aSubjectPrincipal,
ErrorResult& aError) {
nsContentUtils::SetHTMLUnsafe(this, this, aHTML, false /*aIsShadowRoot*/,
aSubjectPrincipal, aError);
nsContentUtils::SetHTMLUnsafe(this, this, aHTML, aOptions,
false /*aIsShadowRoot*/, aSubjectPrincipal,
aError);
}
// https://html.spec.whatwg.org/#event-beforematch