From ae1f6e6c5e92feaccb3f0684dcd131a79750485b Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Thu, 17 Jun 2021 13:58:03 -0700 Subject: [PATCH] Replace unpaired surrogates in result of javascript URLs Given a URL like javascript:String.fromCodePoint(0xDE0D), Chrome currently displays three U+FFFD replacement characters rather than just one, due to the incorrect UTF-8 conversion mode. We fix that by using kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD. This CL fully implements https://github.com/whatwg/html/pull/6781. Tests are partially taken from https://github.com/web-platform-tests/wpt/pull/29419. Co-authored-by: Domenic Denicola Bug: 1221018 Change-Id: Ic1282d0a88eabb40b4d5d8d8c68e040e9a0a938d --- ...ipt-url-return-value-handling-dynamic.html | 51 ---------------- ...turn-value-handling-dynamic.tentative.html | 58 +++++++++++++++++++ 2 files changed, 58 insertions(+), 51 deletions(-) delete mode 100644 html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html create mode 100644 html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.tentative.html diff --git a/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html b/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html deleted file mode 100644 index 0441d174cee07f2..000000000000000 --- a/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html +++ /dev/null @@ -1,51 +0,0 @@ - - -Test javascript URL string return values in direct and indirect (target) frame contexts. - - -
- diff --git a/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.tentative.html b/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.tentative.html new file mode 100644 index 000000000000000..3c08d29674bdc2d --- /dev/null +++ b/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.tentative.html @@ -0,0 +1,58 @@ + + +Test javascript URL string return values in direct and indirect (target) frame contexts. + + + +
+