This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9144 - 
 should expand to CR
Summary: 
 should expand to CR
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC All
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-25 10:33 UTC by Henri Sivonen
Modified: 2010-10-04 14:31 UTC (History)
6 users (show)

See Also:


Attachments

Description Henri Sivonen 2010-02-25 10:33:15 UTC
Spec rev. 942 made 
 expand to LF.
http://html5.org/tools/web-apps-tracker?from=941&to=942

The top 4 browser engines expand it to CR.
http://hsivonen.iki.fi/test/moz/escaped-crlf.html

Mozilla has at least one test case that expects the expansion to CR, although the test case is not based on a real-world site.

This is also a gratuitous difference between text/html and XML, see:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2007-June/011703.html

Given the legacy text/html behavior and the XML behavior, I think it's not worthwhile to map 
 to LF and risk the change causing any compat issues, even though I have no evidence of Web compat issues here.

Please revert rev 942 (I'm OK with making 
 a parse error, though).

Note: Please don't make a CR expanded from 
 followed by an LF coalesce into an LF like a literal CRLF sequence.
Comment 1 Ian 'Hixie' Hickson 2010-04-01 01:21:28 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 2 contributor 2010-04-01 01:21:47 UTC
Checked in as WHATWG revision r4933.
Check-in comment: Make 
 map to U+000D and not U+000A. This has ramifications throughout the parser.
http://html5.org/tools/web-apps-tracker?from=4932&to=4933
Comment 3 Ms2ger 2010-04-05 15:42:20 UTC
For the record, behavior in content is somewhat less interoperable than in attributes. (I agree that expanding to CR makes more sense, though.)

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/448

Browser   Content Attribute
Chrome    \n      \r
Minefield \n      \r
Opera     \r      \r
IE        space   \r
Comment 4 Henri Sivonen 2010-04-08 12:08:01 UTC
(In reply to comment #3)
> For the record, behavior in content is somewhat less interoperable than in
> attributes. (I agree that expanding to CR makes more sense, though.)
> 
> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/448
> 
> Browser   Content Attribute
> Chrome    \n      \r
> Minefield \n      \r
> Opera     \r      \r
> IE        space   \r

FWIW, making 
 expand to CR in element content regressed the rendering of at least one site in Gecko:
https://bugzilla.mozilla.org/show_bug.cgi?id=557197

However, this could alternatively be treated as a layout bug.