DevTools: fix encoding for Copy as cURL
Before, the 'Copy as cURL' option would escape all characters outside of a limited range [\x20-\x7e] with ANSI-C `\u` or `\x`. This caused problems because `\x` does not properly encode Unicode chars outside of the range (e.g. latin, CJK, emoji). Instead, this CL treats control codes (C0, C1 sets) as the only characters that need `\u` escaping, while everything else (except single quote, backslash, newline) is not escaped. Bug: 578054 Change-Id: I47301014ebe394bd02eb9f6c60108f4962f331ca Reviewed-on: https://chromium-review.googlesource.com/1155924Reviewed-by:Joel Einbinder <einbinder@chromium.org> Reviewed-by:
Andrey Lushnikov <lushnikov@chromium.org> Commit-Queue: Erik Luo <luoe@chromium.org> Cr-Commit-Position: refs/heads/master@{#584664}
Showing
Please register or sign in to comment