DescriptionDOM serialization: proper quoting for < and > in HTML attribute values.
< and > should not be quoted in HTML attributes. Internet Explorer and
Firefox do not quote them. Safari (still) does. The DOM serialization
and parsing specification defers to the HTML specification, which says
that < and > should not be quoted.
http://www.w3.org/html/wg/drafts/html/master/syntax.html#attribute's-serialized-name
In XML attributes, < must be quoted. > does not need to be quoted, but
all browsers currently quote both < and > in XML, so we do the same. The
DOM serialization and parsing specification says neither should be
quoted, but there is an outstanding bug, because not quoting < produces
invalid XML.
https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#dfn-concept-serialize-xml-attributes
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24174
This change makes us not quote < and > in HTML attributes, and slightly
expands the test that ensures we quote < and > in XML attributes.
BUG=330949
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164489
Patch Set 1 : Fix layout test on Internet Explorer. #Patch Set 2 : < and > are un-quoted in HTML, quoted in XML. #
Messages
Total messages: 8 (0 generated)
|