- From: Michael[tm] Smith <mike@w3.org>
- Date: Mon, 24 Jun 2013 15:04:48 +0900
- To: Šime Vidas <sime.vidas@gmail.com>
- Cc: public-html@w3.org
Šime Vidas <sime.vidas@gmail.com>, 2013-06-23 00:09 +0200: > From what I understand, named character references, e.g. &, 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. The <script> and <style> elements are exceptions > For instance, this source code: > > <span>&</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 > & but the actual "&" literal character. True for all other elements but for <script>&</script> and <style>&</style> the result's a text node containing the string "&" -- Michael[tm] Smith http://people.w3.org/mike
Received on Monday, 24 June 2013 06:05:00 UTC