The test is wrong: we *do* want to unescape the %21 to '!' in <http://www.google.com/%21%00ok>; it should be unescaped to <http://www.google.com/!%00ok>, such that the presence of %00 does not alter the transformation we apply to the "%21" sequence.
Another solid test case is <http://everything2.com/title/%2526%252364%253B>, which we currently *over*-unescape (to "http://everything2.com/title/%26%2364%3B"), such that after visiting the url hitting Enter in the url bar will reach a 404 page. It's actually as escaped as it can be as presented ("http://everything2.com/title/%2526%252364%253B"): the only escaped characters are %25s, which shouldn't be unescaped (since doing so would cause them to "eat" following digits when a user hits enter).
« Back to merge proposal
The test is wrong: we *do* want to unescape the %21 to '!' in <http:// www.google. com/%21% 00ok>; it should be unescaped to <http:// www.google. com/!%00ok>, such that the presence of %00 does not alter the transformation we apply to the "%21" sequence.
Another solid test case is <http:// everything2. com/title/ %2526%252364% 253B>, which we currently *over*-unescape (to "http:// everything2. com/title/ %26%2364% 3B"), such that after visiting the url hitting Enter in the url bar will reach a 404 page. It's actually as escaped as it can be as presented ("http:// everything2. com/title/ %2526%252364% 253B"): the only escaped characters are %25s, which shouldn't be unescaped (since doing so would cause them to "eat" following digits when a user hits enter).