Closed Bug 1716624 Opened 3 years ago Closed 3 years ago

[sanitizer] implement Element.setHTML(input, sanitizer)

Categories

(Core :: DOM: Security, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: freddy, Assigned: freddy)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [domsecurity-active])

Attachments

(2 files)

No description provided.
Severity: -- → S4
Status: NEW → ASSIGNED
Priority: -- → P3
Whiteboard: [domsecurity-active]

This bug is about implementing the spec changes that arose from https://github.com/WICG/sanitizer-api/issues/42 (adding to a body comment in case the See Also ever gets stomped, or people miss that reference in the header)

Keywords: dev-doc-needed
Attachment #9237962 - Attachment description: WIP: Bug 1716624 [sanitizer] Empty bindings for Element::SetHTML() f?hsivonen → Bug 1716624 [sanitizer] Element::SetHTML() r?hsivonen
Summary: [sanitizer] implement new api that takes contextual parsing into accoun → [sanitizer] implement Element.setHTML(input, sanitizer)
Pushed by fbraun@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/07e6465d36b9
[sanitizer] Element::SetHTML() r=hsivonen
Pushed by fbraun@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/826af8de7137
prototype implementation of Sanitizer.SanitizeFor r=hsivonen

Backed out for causing build bustages in dom/base/Element.cpp.

Flags: needinfo?(fbraun)
Flags: needinfo?(fbraun)
Pushed by fbraun@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a67288a8c440
[sanitizer] Element::SetHTML() r=hsivonen
Pushed by fbraun@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b9166368209c
prototype implementation of Sanitizer.SanitizeFor r=hsivonen
Depends on: 1731242
Depends on: 1731260

Backed out for causing mochitest failures on test_sanitizer_api.html.

Flags: needinfo?(fbraun)
Pushed by fbraun@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6b8a67596d2c
[sanitizer] Element::SetHTML() r=hsivonen
Pushed by fbraun@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/79141ac1bf85
prototype implementation of Sanitizer.SanitizeFor r=hsivonen
Depends on: 1731587
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
Flags: needinfo?(fbraun)

FYI, the docs update for this can be tracked here: https://github.com/mdn/content/issues/9366#issuecomment-934088883

  • the BCD is accepted but has not gone live at time I write this.
  • The docs changes are here: https://github.com/mdn/content/pull/9579
    In summary,
    • adds Element.setHTML, Sanitizer.sanitizeFor()
    • removes Sanitizer.sanitizeToString()
    • tidies up the config options to match spec (while still noting they are not supported)
    • Fixes up all the top level docs and cross linking.
Depends on: 1777164
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: