W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > October 2009

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

From: <bugzilla@wiggum.w3.org>
Date: Thu, 22 Oct 2009 11:35:23 +0000
To: public-html-bugzilla@w3.org
Message-ID: <bug-8003-2486@http.www.w3.org/Bugs/Public/>

           Summary: line breaks in attributes (especially title)
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec bugs
        AssignedTo: dave.null@w3.org
        ReportedBy: davidc@nag.co.uk
         QAContact: public-html-bugzilla@w3.org
                CC: ian@hixie.ch, mike@w3.org, public-html@w3.org

It's quite useful to be able to put line breaks in title attributes to make
multi-line tooltips, although support for this is currently sporadic (not in
firefox as far as I can see, and only in IE8 in full standards mode, works in
Opera and Safari)

However the spec says


Caution is advised with respect to the use of newlines in title attributes.

For instance, the following snippet actually defines an abbreviation's
expansion with a line break in it:

<p>My logs show that there was some interest in <abbr title="Hypertext
Transport Protocol">HTTP</abbr> today.</p>

This seems to be an unfortunate change from HTML4 and from XML parsing rules
(thus including the XML serialisation of html5) In HTML4's SGML parsing, or XML
parsing, literal newlines would be normalised to space characters, explicitly
to avoid the problem about which the above quote is cautioning. In order to get
a newline into the attribute value you need to use a character reference such
<abbr title="Hypertext &#10; Transport Protocol">HTTP</abbr> 
newlines (often added by text wrapping editors) in attribute value literals
don't cause a newline in the attribute value.

It would help future parallel authoring of HTML and X((HT)ML if the attribute
value white space normalisation happened in both serialisations.


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 Thursday, 22 October 2009 11:35:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:04 UTC