Line Terminators (and others) normalization in template strings

Waldemar Horwat waldemar at
Thu Sep 26 12:41:32 PDT 2013

On 09/26/2013 11:31 AM, Brendan Eich wrote:
>> Anne van Kesteren <mailto:annevk at>
>> September 26, 2013 5:41 AM
>> What Tab meant is that within the platform only CR and CRLF are
>> normalized to LF and no other code points. This is true for HTML as
>> well.
> This thread is to sort out the LINE and PARA seps. No one likes 'em. JSON missed them. They seem to me only useful for subtle line-numbering/source-hiding attacks. But ECMA-262 would be inconsistent to turn a blind eye toward them.
> Which consistency is greater, HTML or JS standard consistency?

Within JS, the LINE and PARA separators are treated just like CR, LF, and CRLF.  They all break source lines.  They're forbidden inside normal string literals.  They should be treated the same inside multiline string literals.

My general view on such things is to keep them as simple as possible.  Treating LINE and PARA as line terminators in normal strings but not in multiline strings would be yet another bizarre and really obscure thing for people to learn, or get tripped by if they were never taught this.


More information about the es-discuss mailing list