W3C home > Mailing lists > Public > public-html@w3.org > June 2013

During HTML parsing, are *all* named character references replaced by their corresponding glyph?

From: Šime Vidas <sime.vidas@gmail.com>
Date: Sun, 23 Jun 2013 00:09:15 +0200
Message-ID: <CAF=ZmuzK6oUD+-P5CnLszLrJVJ=ZJaB=Z_CnxyvkjF7sbayuqA@mail.gmail.com>
To: public-html@w3.org
(I apologize if this is OT for this mailing list.)

>From what I understand, named character references, e.g. &amp;, only exist
in HTML source code, and once the source code is parsed into the DOM, *all*
named character entities are replaced by their corresponding glyphs. There
is no exception to this rule.

For instance, this source code:

<span>&amp;</span>

will produce a DOM element (of type "span") which contains a single Text
node which then in turn contains the text value "&". So, not the entity
&amp; but the actual "&" literal character.

Could you confirm that the above is correct?

-- @simevidas
Received on Saturday, 22 June 2013 22:09:41 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:33 UTC