FromURL() does not decode '+' into a space before having encountered the '?' query delimiter character.
[INTERPRETER] * BUG: FromURL() does not decode '+' into a space before having encountered the '?' query delimiter character.
This commit is contained in:
parent
9885f645c4
commit
b610a6a2d1
1 changed files with 17 additions and 11 deletions
|
@ -1237,21 +1237,27 @@ __FROM_BASE64:
|
|||
|
||||
__FROM_URL:
|
||||
|
||||
for (i = 0; i < lstr; i++)
|
||||
{
|
||||
c = str[i];
|
||||
if (c == '+')
|
||||
c = ' ';
|
||||
else if (c == '%')
|
||||
bool query = FALSE;
|
||||
|
||||
for (i = 0; i < lstr; i++)
|
||||
{
|
||||
if (i >= (lstr - 2))
|
||||
break;
|
||||
c = str[i];
|
||||
if (c == '%')
|
||||
{
|
||||
if (i >= (lstr - 2))
|
||||
break;
|
||||
|
||||
c = (read_hex_digit(str[i + 1]) << 4) + read_hex_digit(str[i + 2]);
|
||||
i += 2;
|
||||
c = (read_hex_digit(str[i + 1]) << 4) + read_hex_digit(str[i + 2]);
|
||||
i += 2;
|
||||
}
|
||||
else if (c == '?')
|
||||
query = TRUE;
|
||||
else if (c == '+' && query)
|
||||
c = ' ';
|
||||
|
||||
STRING_make_char(c);
|
||||
}
|
||||
|
||||
STRING_make_char(c);
|
||||
}
|
||||
|
||||
goto __END;
|
||||
|
|
Loading…
Reference in a new issue