[Bug 8003] line breaks in attributes (especially title)

http://www.w3.org/Bugs/Public/show_bug.cgi?id=8003





--- Comment #8 from David Carlisle <davidc@nag.co.uk>  2009-10-26 22:36:49 ---
(In reply to comment #6)

> Browsers have parsed attributes like this all the time, AFAIK.
> 

Depressing. It makes one wonder what's the point of having a specification if
it is just going to be ignored.




HTML since at least HTML2 has always been quite explict that attribute values
should be normalized, this follows from the SGML declaration but to save people
reading that, the specs have highlighted this feature:

For example

HTML 2
http://tools.ietf.org/html/rfc1866#section-3.2

 A useful technique for computing an attribute value literal for a
   given string is to replace each quote and white space character by an
   entity reference or numeric character reference as follows:



html 3.2 references
http://www.w3.org/TR/WD-html-lex/#API
which says

Section 7.9.3 of SGML says that an attribute value literal is interpreted as an
attribute value by:

    * Removing the quotes
    * Replacing character and entity references
    * Deleting character 10 (ASCII LF)
    * Replacing character 9 and 13 (ASCII HT and CR) with character 32 (SPACE) 



HTML4
http://www.w3.org/TR/html4/types.html

CDATA is a sequence of characters from the document character set and may
include character entities. User agents should interpret attribute values as
follows:

    * Replace character entities with characters,
    * Ignore line feeds,
    * Replace each carriage return or tab with a single space.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 26 October 2009 22:36:53 UTC