Edit report at https://bugs.php.net/bug.php?id=80277&edit=1
ID: 80277
User updated by: nnikolay at gmail dot com
Reported by: nnikolay at gmail dot com
Summary: parse_url & parse_str problems with values with
percentage
Status: Open
Type: Bug
Package: URL related
Operating System: Debian 10
PHP Version: 7.4.11
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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?
------------------------------------------------------------------------
[2020-10-23 15:09:54] cmb@php.net
Percent characters in an URI introduce a percent-encoded[1]
character, and parse_url() and parse_str() interpret it as such.
A literal percent character would have to be written as %25 in an
URI, see <https://3v4l.org/2C3Bo>.
[1] <https://en.wikipedia.org/wiki/Percent-encoding>
------------------------------------------------------------------------
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