[whatwg] CR "entities" and LFCR

Anne van Kesteren annevk at opera.com
Fri Jun 8 00:35:20 PDT 2007

On Thu, 07 Jun 2007 23:12:38 +0200, Michael A. Puls II  
<shadow2531 at gmail.com> wrote:
> On 6/7/07, Anne van Kesteren <annevk at opera.com> wrote:
>> These should be converted to LF too. 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).
> Not sure if it'll help, but whenever I do newline normalization to LF, I:
> Convert all CR + LF pairs to LF.
> Then, I convert any CRs left over to LF.

Sure, that's what the specification says to do as well. I was wondering if  
some user agents do something special for LFCR. For instance, if I  
remember correctly using \n\r in JavaScript gives a single newline in  
Firefox and two in Opera.

Anne van Kesteren

More information about the whatwg mailing list