Bug 227844 - XMLSerializer.serializeToString() doesn't properly escape \n, \r and \t
Summary: XMLSerializer.serializeToString() doesn't properly escape \n, \r and \t
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: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-09 15:27 PDT by Chris Dumez
Modified: 2021-07-11 11:22 PDT (History)
8 users (show)

See Also:


Attachments
Patch (7.21 KB, patch)
2021-07-09 15:30 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (7.21 KB, patch)
2021-07-09 15:31 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 2021-07-09 15:27:50 PDT
XMLSerializer.serializeToString() doesn't properly escape \n, \n and \t.

This is causing the "check XMLSerializer.serializeToString escapes attribute values for roundtripping" subtest to fail in WebKit on:
http://wpt.live/domparsing/XMLSerializer-serializeToString.html

Chrome and Firefox both escape these and pass this WPT subtest.
Comment 1 Chris Dumez 2021-07-09 15:30:14 PDT
Created attachment 433243 [details]
Patch
Comment 2 Chris Dumez 2021-07-09 15:31:04 PDT
Created attachment 433244 [details]
Patch
Comment 3 EWS 2021-07-11 11:21:00 PDT
Committed r279815 (239576@main): <https://commits.webkit.org/239576@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 433244 [details].
Comment 4 Radar WebKit Bug Importer 2021-07-11 11:22:17 PDT
<rdar://problem/80438470>