Chrome Version: 64
OS: all
What steps will reproduce the problem?
(1) GURL url("alert:test \"message\"")
(2) LOG(INFO) << url.spec()
What is the expected result?
alert:test%20%22message%22
What happens instead?
alert:test "message"
Note that if you use mailto, it does behave as expected, because this is special-cased for mailto. Also, ExternalProtocolHandler includes code to escape the URL characters so an unescaped URL isn't sent to an external program. However, I think this logic should be pushed up to the GURL constructor, and not have to be handled in ExternalProtocolHandler.
These characters are simply illegal according to both RFC 3986 [1] and URL Standard [2], so no GURL should contain them without being escaped.
[1] https://www.ietf.org/rfc/rfc3986.txt
[2] https://url.spec.whatwg.org/
Comment 1 by mgiuca@chromium.org
, May 30 2018