Skip to content

Documentation error: Text type="html" (resubmission) #166

@martin7th

Description

@martin7th

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;amp;T bought &amp;lt;b&amp;gt;by SBC&amp;lt;/b&amp;gt;!
</title>

after the HTML was escaped twice.

It should say,

<title type="html">
  AT&amp;T bought &lt;b&gt;by SBC&lt;/b&gt;!
</title>

after the HTML was escaped once.

Escaping once is what the example given in RFC 4287 section 3.1.1.2 does:

Less: &lt;em> &amp;lt; &lt;/em>

when unescaped once, becomes HTML containing a character entity reference for the less-than character,

Less: <em> &lt; </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.

.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions