[whatwg] CR "entities" and LFCR

On Fri, 08 Jun 2007 20:53:54 +0200, Michael A. Puls II  
<shadow2531 at gmail.com> wrote:
> I believe Boris told me for FF, newline normalization (including
> entities) is only done for parsing into the DOM and that any setting
> of a string property in JS does zero newline normalization. So, if you
> set \n\r, \n\r is stored as-is (which we visually equivalent as having
> 2 newlines) and if there needs to be any normalization, it needs to be
> done by the author of the JS code.

Some further testing shows that for layout purposes Firefox uses \n is a  
line delimiter in their white space algorithm and \r is simply ignored.  
Internet Explorer uses \r as line delimiter and \n as _space_. Opera uses  
both, but \r\n is a single line break.

can be used for playing with this.

Anne van Kesteren

Received on Monday, 11 June 2007 07:43:43 UTC