diff --git a/files/en-us/mozilla/firefox/experimental_features/index.md b/files/en-us/mozilla/firefox/experimental_features/index.md index f23a038ad6092c4..ebaae2956b1c27b 100644 --- a/files/en-us/mozilla/firefox/experimental_features/index.md +++ b/files/en-us/mozilla/firefox/experimental_features/index.md @@ -1108,6 +1108,49 @@ The [HTML Sanitizer API](/en-US/docs/Web/API/HTML_Sanitizer_API) allow developer +### Escape < and > in attributes when serializing HTML + +Firefox replaces the `<` and `>` characters with `<` and `>` (respectively) in attributes when serializing HTML. +This prevents certain exploits where HTML is serialized and then injected back into the DOM. +The affected methods and properties are: {{domxref("Element.innerHTML")}}, {{domxref("Element.outerHTML")}}, {{domxref("Element.getHTML()")}}, {{domxref("ShadowRoot.innerHTML")}}, and {{domxref("ShadowRoot.getHTML()")}}. +([Firefox bug 1941347](https://bugzil.la/1941347)). + +
| Release channel | +Version added | +Enabled by default? | +
|---|---|---|
| Nightly | +139 | +Yes | +
| Developer Edition | +139 | +No | +
| Beta | +139 | +No | +
| Release | +139 | +No | +
| Preference name | +dom.security.html_serialization_escape_lt_gt |
+ |