[whatwg] CR "entities" and LFCR

Ian Hickson ian at hixie.ch
Thu Jun 21 17:01:53 PDT 2007

On Thu, 7 Jun 2007, Anne van Kesteren wrote:
> [CR "entities" and LFCR] should be converted to LF too.

Done for CR entities. I couldn't reproduce LFCR->LF anywhere other than 
Firefox, and I'm not really convinced that Firefox does it reliably 
everywhere either, so I've not done that.

> One thing that might be interesting to look into is the handling of LFCR 
> in browsers (as opposed to CRLF). I haven't done that yet... Some 
> browsers (just tested Opera) also normalize two newline entities 
> following each other (CRLF pair).

I couldn't reproduce that -- IE came close but really IE is just dumping 
all CRs on the floor.

<!DOCTYPE html>[<span>error</span>]
document.getElementsByTagName('span')[0].innerHTML = '&#x0D;&#x0A;';
document.write(document.getElementsByTagName('span')[0].firstChild.data.charCodeAt(0) + ';')

Opera: 13;10
Firefox: 10;10
Safari: 10;10
IE: 32;NaN

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list