Skip to content

Commit

Permalink
Note that we will not add new named character references
Browse files Browse the repository at this point in the history
Closes whatwg#3655. Closes whatwg#5121. Closes whatwg#6049.
  • Loading branch information
domenic authored and mfreed7 committed Jun 3, 2022
1 parent 2b611f5 commit 5662df8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,16 @@ Short of that, there are actually quite a number of ways for people to invent th

HTML allows `<div>` as a grouping element in `<dl>`. See [the `<dl>` specification](https://html.spec.whatwg.org/multipage/#the-dl-element) and [issue #1937](https://github.com/whatwg/html/issues/1937) wherein this was added.

### HTML should add more named character references!

Although this would be convenient, the overall conclusion of the editors and of browser engine implementers is that expanding the [named character references](https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references) list is not worth the cost to the ecosystem:

* The backward-compatibility characteristics of such additions are bad. They do not add new capabilities, since you can already use numeric character references or unescaped code points; they just introduce new ways of writing the same thing, which will fail to display correctly in older browsers.

* The benefits of such features can also be accomplished by preprocessor languages directly. That is, preprocessed languages that compile to HTML, such as Markdown, wiki syntax, JSX, or server-side templating systems, can add these capabilities themselves. The only reason to add these to the browser is to help people writing raw HTML. We do want to support people writing raw HTML, but features for that audience are less impactful than general web platform features, which weighs into the overall decision as to whether to add them or not.

* Most importantly, [the HTML parser is security sensitive](https://github.com/whatwg/html/issues/919#issuecomment-276329905). Any changes in it can cause mismatches between markup producers and markup consumers until everyone is updated to the latest version, which can lead to security bugs. This means that changes to the parser have to add an extreme amount of value to the ecosystem, to overcome this security hazard. Per the above points, our judgment is that adding or modifying named character references does not meet this bar.

### Where's the harm in adding...?

Every feature we add to the web platform has a cost:
Expand Down
4 changes: 4 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -115445,6 +115445,10 @@ console.assert(container.firstChild instanceof SuperP);
Characters</cite>, though only the above is considered normative. <ref
spec=XMLENTITY></p>

<p class="note">This list is static and <a
href="https://github.com/whatwg/html/blob/main/FAQ.md#html-should-add-more-named-character-references">will
not be expanded or changed in the future</a>.</p>


<h2 split-filename="xhtml" id="the-xhtml-syntax"><dfn id="xhtml">The XML syntax</dfn></h2>

Expand Down

0 comments on commit 5662df8

Please sign in to comment.