Edit report at https://bugs.php.net/bug.php?id=80277&edit=1
ID: 80277
Updated by: girgias@php.net
Reported by: nnikolay at gmail dot com
Summary: parse_url & parse_str problems with values with
percentage
-Status: Open
+Status: Not a bug
Type: Bug
Package: URL related
Operating System: Debian 10
PHP Version: 7.4.11
Block user comment: N
Private report: N
New Comment:
% has special semantics in URL see:
>>> In addition, octets may be encoded by a character triplet consisting
of the character "%" followed by the two hexadecimal digits (from
"0123456789ABCDEF") which forming the hexadecimal value of the octet.
(The characters "abcdef" may also be used in hexadecimal encodings.)
Source: Section 2.2. URL Character Encoding Issues of RFC 1738 - Uniform Resource Locators (URL)
http://www.faqs.org/rfcs/rfc1738.html
Previous Comments:
------------------------------------------------------------------------
[2020-10-23 18:22:12] nnikolay at gmail dot com
Then do something and comment it on your docu page before trying to make the other people clueless.
If it's in the docu it is ok and makes sense, if not it is unexpected behavior and in each
language, it is a BUG. Only because you think to know it, means not, that other people need to try
all the variations of some function and to see what would be the results.
------------------------------------------------------------------------
[2020-10-23 18:03:43] eveg at dbdh dot com
what about trying to understand how the basics are working before stubborn comments full of
clueless?
the % has a special meaning - period
------------------------------------------------------------------------
[2020-10-23 15:42:36] nnikolay at gmail dot com
Of course, it is nonsense if you need to convert "%" but nothing else. Where did you have
this in the documentation of parse_url? Or should we have some glass sphere to predict it? For me,
it is a nonsense behavior of a function and of course a BUG!
------------------------------------------------------------------------
[2020-10-23 15:33:09] cmb@php.net
> But this makes nonsense!
If you say so.
------------------------------------------------------------------------
[2020-10-23 15:22:34] nnikolay at gmail dot com
But this makes nonsense! Why should I convert the "%" to "%25" before I gave it
to the function parse_url? Why the function parse_url & parse_str do not make it? If this is so,
why I should not convert "&" to "%26" and all the other characters?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=80277
--
Edit this bug report at https://bugs.php.net/bug.php?id=80277&edit=1