Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Issue 117103003: DOM serialization: fix quoting of < and > in HMTL attribute values. (Closed)

Created:
6 years, 12 months ago by pwnall-personal
Modified:
6 years, 11 months ago
Reviewers:
adamk, abarth-chromium
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

DOM 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -15 lines) Patch
M LayoutTests/editing/pasteboard/paste-noscript-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/fast/dom/XMLSerializer-attribute-entities.html View 1 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/XMLSerializer-attribute-entities-expected.txt View 1 1 chunk +11 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/dom-parse-serialize.html View 2 chunks +10 lines, -10 lines 0 comments Download
M LayoutTests/fast/dom/dom-parse-serialize-expected.txt View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/editing/MarkupAccumulator.h View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
pwnall-personal
Can you please take a look?
6 years, 12 months ago (2013-12-29 01:33:01 UTC) #1
abarth-chromium
Can you add information to the description about whether this change aligns us more or ...
6 years, 11 months ago (2014-01-04 05:30:49 UTC) #2
pwnall-personal
On 2014/01/04 05:30:49, abarth wrote: > Can you add information to the description about whether ...
6 years, 11 months ago (2014-01-04 07:11:11 UTC) #3
abarth-chromium
On 2014/01/04 07:11:11, pwnall wrote: > For HTML attributes, this change gets us closer to ...
6 years, 11 months ago (2014-01-04 17:56:34 UTC) #4
pwnall-personal
On 2014/01/04 17:56:34, abarth wrote: > It seems like we should keep matching other browsers ...
6 years, 11 months ago (2014-01-04 19:28:11 UTC) #5
abarth-chromium
lgtm Thanks!
6 years, 11 months ago (2014-01-04 19:33:58 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/costan@gmail.com/117103003/200001
6 years, 11 months ago (2014-01-04 19:34:05 UTC) #7
commit-bot: I haz the power
6 years, 11 months ago (2014-01-06 04:34:50 UTC) #8
Message was sent while issue was closed.
Change committed as 164489

Powered by Google App Engine
This is Rietveld 408576698