From 13f13a9e5941e6311e044bbb056b1d72334bdf19 Mon Sep 17 00:00:00 2001 From: Conrad Pankoff Date: Sun, 13 Dec 2020 09:32:38 +1100 Subject: [PATCH] AK: Fix urlencode() with high byte values Previously urlencode() would encode bytes above 127 incorrectly, printing them as negative hex values. --- AK/URLParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/URLParser.cpp b/AK/URLParser.cpp index 5cd94aae01c..d77834816b0 100644 --- a/AK/URLParser.cpp +++ b/AK/URLParser.cpp @@ -93,7 +93,7 @@ static inline bool in_userinfo_set(u32 c) String urlencode(const StringView& input) { StringBuilder builder; - for (char ch : input) { + for (unsigned char ch : input) { if (in_userinfo_set((u8)ch)) { builder.append('%'); builder.appendff("{:02X}", ch);