[Bug 21711] Unclear statement regarding inclusion of newlines in <pre> and <textarea>

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21711

Sam Ruby <rubys@intertwingly.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rubys@intertwingly.net

--- Comment #1 from Sam Ruby <rubys@intertwingly.net> ---
I believe I can shed some light on the history of this statement.  Obviously,
reword it to taste.

When I was exploring the differences between XHTML and HTML, I noticed that
while all newlines are significant in XHTML, the first newline of pre elements
are ignored.  What you generally see in HTML is a <pre> on a separate line, one
or more lines of text, and a </pre> again on a separate line.

In XHTML, this results in a blank line preceding the text.

I brought this up to Ian as something that wasn't (then) covered by the spec,
and he added a paragraph (I haven't followed closely to see if it since
changed).

Net effect: consuming applications of HTML must ignore the first character in
the the <pre> and <textarea> elements if that character is a newline.

HTML producing applications can optionally add a newline in front of the value,
but only are required to do so if the first character of that value is a
newline.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 16 April 2013 21:17:41 UTC