Fix space handling in url_en/decode
This commit is contained in:
@@ -51,8 +51,7 @@ void url_encode(Noh_String *string) {
|
||||
for (size_t i = 0; i < string->count; i++) {
|
||||
char cur = string->elems[i];
|
||||
if (cur == ' ') noh_da_append(&result, '+');
|
||||
|
||||
if (!byte_is_url_safe(cur)) {
|
||||
else if (!byte_is_url_safe(cur)) {
|
||||
noh_da_append(&result, '%');
|
||||
noh_da_append(&result, to_char_lower(cur >> 4));
|
||||
noh_da_append(&result, to_char_lower(cur));
|
||||
|
||||
Reference in New Issue
Block a user