W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2009

[whatwg] Initial carriage return in <pre> and <textarea>

From: Henri Sivonen <hsivonen@iki.fi>
Date: Fri, 11 Sep 2009 11:12:59 +0300
Message-ID: <5121E060-51EF-4559-9ADC-927663E27190@iki.fi>
On Sep 10, 2009, at 23:40, ?istein E. Andersen wrote:

> ? 9.1.2.5 "Restrictions on content models" mentions that an initial  
> line feed (\n) character inside <pre> and <textarea> will be  
> removed.  Should it not cover carriage return (\r) and \r\n as well?


If you put \r or \r\n in the source, you are expressing a \n. If you  
want to express a \r, you need to escape it, and then the tree builder  
doesn't zap it.

There probably needs to be a note saying that writing \r really means  
\n for the content model purposes.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
Received on Friday, 11 September 2009 01:12:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:52 UTC