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 24211 - < should be quoted in attribute values
Summary: < should be quoted in attribute values
Status: RESOLVED DUPLICATE of bug 24174
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM Parsing and Serialization (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-06 04:32 UTC by Michael[tm] Smith
Modified: 2014-10-13 23:45 UTC (History)
5 users (show)

See Also:


Attachments

Description Michael[tm] Smith 2014-01-06 04:32:07 UTC
Quoting Victor's description and comments from Bug #24174:

The XML specification forbids < in attribute values.

Source 1: see the grammar for AttValue below.
http://www.w3.org/TR/REC-xml/#sec-common-syn

Source 2: http://www.w3.org/TR/REC-xml/#CleanAttrVals


The XML serialization algorithm in the DOM Parsing and Serialization specification can produce < in XML attribute values.

https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#dfn-concept-serialize-xml-attributes

Specifically, step 2 substep 4 only quotes " and &. It should also quote < as &lt;.

One more note -- all browsers currently quote both < (as ^&lt;) and > (as &gt;) in XML attributes.
Comment 1 Travis Leithead [MSFT] 2014-10-13 23:45:48 UTC

*** This bug has been marked as a duplicate of bug 24174 ***