You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug fix: PercentDecode crashed the server with a DOMAIN ERROR on percent-encoded data that is not valid UTF-8, such as "/%C0" or "/Assets/Fonts/cq.%8A%DE". Rewritten: invalid sequences now become U+FFFD as the WHATWG URL standard has it (new function DecodeUTF8, which does what 'UTF-8'⎕UCS does but never fails), escapes that are not adjacent are no longer joined, and decoding happens once only ("%2541" is "%41").
PercentDecode works around 'UTF-8'⎕UCS reading beyond the end of its argument: a sequence cut short by the end, such as "%C3", was sometimes completed by a stray byte from memory and decoded into a wrong character instead of U+FFFD.
Tests added: TestPercentDecode, TestDecodeUTF8 (neither needs a server) and TestInvalidPercentEncoding.