Bug 162356 - Fix serialization of HTML Element attributes
Summary: Fix serialization of HTML Element attributes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: WebExposed
Depends on: 171132
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-21 13:00 PDT by Chris Dumez
Modified: 2017-04-21 12:50 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.97 KB, patch)
2016-09-21 13:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-09-21 13:00:04 PDT
Fix serialization of Element attributes to align with:
- https://html.spec.whatwg.org/#html-fragment-serialisation-algorithm
- https://html.spec.whatwg.org/#escapingString

In particular, we should not escape '<' and '>'.

Firefox and Chrome both match the specification.
Comment 1 Chris Dumez 2016-09-21 13:17:36 PDT
Only impacts HTML. For XML serialization, we are supposed to escape '<' / '>' in attribute values:
- https://w3c.github.io/DOM-Parsing/#dfn-serializing-an-attribute-value
Comment 2 Chris Dumez 2016-09-21 13:36:33 PDT
Created attachment 289473 [details]
Patch
Comment 3 WebKit Commit Bot 2016-09-21 15:48:08 PDT
Comment on attachment 289473 [details]
Patch

Rejecting attachment 289473 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 289473, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
ckout/scm/scm.py", line 77, in run
    decode_output=decode_output)
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 443, in run_command
    output = output.decode(self._child_process_encoding())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xfc in position 146: invalid start byte

Full output: http://webkit-queues.webkit.org/results/2120876
Comment 4 Chris Dumez 2016-09-21 15:55:06 PDT
Comment on attachment 289473 [details]
Patch

Clearing flags on attachment: 289473

Committed r206240: <http://trac.webkit.org/changeset/206240>
Comment 5 Chris Dumez 2016-09-21 15:55:10 PDT
All reviewed patches have been landed.  Closing bug.