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 13709 - [html5] Attribute value normalization is not backwards compatible
Summary: [html5] Attribute value normalization is not backwards compatible
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other All
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.w3.org/mid/201108082059.25...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-09 07:23 UTC by HTML WG bugbot
Modified: 2011-08-16 09:23 UTC (History)
7 users (show)

See Also:


Attachments

Description HTML WG bugbot 2011-08-09 07:23:50 UTC
public-html-comments posting from: Bert Bos <bert@w3.org>
http://www.w3.org/mid/201108082059.25340.bert@w3.org
Comment 1 Michael[tm] Smith 2011-08-09 07:27:41 UTC
[[

A personal comment on http://www.w3.org/TR/2011/WD-
html5-20110525/elements.html#the-title-attribute

(That section is actually only an example, but I didn't immediately see 
where the parsing of attributes is formally defined. Sorry.)

The way string-valued attributes are processed in HTML5 is not backwards 
compatible with the way in HTML4. In HTML4, newlines in the source 
become spaces in the attribute value, but in HTML5 they become line 
feeds and/or carriage returns.

Section 3.2.3.2 shows an example: although the mark-up contains no 
"&#10;" entity, the attribute value still contains a line feed.

The handling of line ends isn't specific to HTML4, but is a property of 
SGML (and thus also XML) and thus it risks being difficult to change in 
existing software. In my own software, e.g., it is handled at a very low 
level in the tokenizer.

The proposed new way is also inconvenient: In HTML4, you can format the 
source code to avoid long lines: 

    ... <span title="Some long title here">...</span> <span title="Some
    long title here">...</span>...

and the two attributes will be equal to one another, but not so in 
HTML5. 
]]
Comment 2 Anne 2011-08-16 09:23:24 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: Rejected
Change Description: no spec change
Rationale: This is another case where HTML4 was not aligned with popular implementations. E.g. not preserving whitespace for <input type=hidden> would break sites. And browsers actually got a lot of requests to preserver whitespace for the title attribute as well (in the UI, they already did at tree-level).