W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > December 2011

[Bug 15002] Clarify status of initial newline in <pre> and <textarea>

From: <bugzilla@jessica.w3.org>
Date: Thu, 01 Dec 2011 06:24:16 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1RW048-0007TL-LR@jessica.w3.org>

Henri Sivonen <hsivonen@iki.fi> changed:

           What    |Removed                     |Added
                 CC|                            |hsivonen@iki.fi

--- Comment #1 from Henri Sivonen <hsivonen@iki.fi> 2011-12-01 06:24:15 UTC ---
(In reply to comment #0)
> In the Newlines in textarea and pre Elements section, please add something
> clarifying that in order to begin the content of one of these elements with a
> newline, a character reference, e.g. &#10;, should be used.

A character reference is no different from a literal line feed character in
this case. The character reference is expanded on the tokenizer level but the
line feed is dropped on the tree builder level. The tree builder doesn't know
if the character originated from a character reference, so &#10; immediately
after <pre> gets dropped, too.

See http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1265 in a
browser that implements the HTML parsing algorithm.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 1 December 2011 06:24:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:02:09 UTC