-
Notifications
You must be signed in to change notification settings - Fork 57
Documentation error: Text type="html" (resubmission) #166
Description
Resubmitting this, perhaps I could have been more elaborate yesterday.
The text type="html" encoding example given at validator.w3.org/feed/docs/atom.html#text says
<title type="html">
AT&amp;T bought &lt;b&gt;by SBC&lt;/b&gt;!
</title>
after the HTML was escaped twice.
It should say,
<title type="html">
AT&T bought <b>by SBC</b>!
</title>
after the HTML was escaped once.
Escaping once is what the example given in RFC 4287 section 3.1.1.2 does:
Less: <em> &lt; </em>
when unescaped once, becomes HTML containing a character entity reference for the less-than character,
Less: <em> < </em>
when unescaped twice, becomes non-HTML,
Less: <em> < </em>
because an HTML element name (generic identifier) cannot contain blanks or less-than characters and therefore cannot "validly appear directly within an HTML <DIV> element".
Observation: the StackExchange sites (among others) never escape HTML twice in their Atom feeds, for example https://english.stackexchange.com/feeds/tag/grammar and https://stackoverflow.com/feeds/tag/atom-feed.
.