-
Notifications
You must be signed in to change notification settings - Fork 22.7k
FF140 escaping <
and >
to <
and >
in attributes when serializing HTML
#39639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FF140 escaping <
and >
to <
and >
in attributes when serializing HTML
#39639
Conversation
instead. | ||
To only obtain the HTML representation of the contents of an element, or to replace the contents of an element, use the {{domxref("Element.innerHTML", "innerHTML")}} property instead. | ||
|
||
Note that some browsers serialize `<` and `>` in attributes as `<` and `>` when reading the HTML (see [Browser compatibility](#browser_compatibility)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only actual change in this page.
The **`innerHTML`** property of the {{domxref("ShadowRoot")}} | ||
interface sets or returns a reference to the DOM tree inside the | ||
`ShadowRoot`. | ||
The **`innerHTML`** property of the {{domxref("ShadowRoot")}} interface sets gets or sets the HTML markup to the DOM tree inside the `ShadowRoot`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text here seemed completely wrong - it isn't a reference. There is a lot more that can be said.
I don't want to say it in this PR because that would be out of scope for this task. I do expect to be back here though, as I am currently doing work on the HTLM sanitization API which tanjentially affects this. I will also be looking at it as I add docs on the injection sinks for TrustedTypes.
Co-authored-by: Hamish Willee <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you :)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
FF140 ships support for escaping
<
and>
to<
and>
in attributes when serializing HTML in https://bugzilla.mozilla.org/show_bug.cgi?id=1962084. This affects all the obvious methods like innerHTML, outerHTML, getHTML etc.This PR removes the info in the experimental features page (the addition to Relnote is in a separate PR).
I also added a note to the end of each of the affected methods pointing down to the browser compatibility for this feature. Note that the feature is non standard, but is expected to be standardized soon.
Related docs work can be tracked in #39628