Bug 227844

Summary: XMLSerializer.serializeToString() doesn't properly escape \n, \r and \t
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, darin, ews-watchlist, ggaren, mifenton, rniwa, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>