Bug->Req #71231 [Opn]: parse_url doesn't urldecode urlencoded characters

From: Date: Mon, 28 Dec 2015 20:47:30 +0000
Subject: Bug->Req #71231 [Opn]: parse_url doesn't urldecode urlencoded characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198263@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71231&edit=1

 ID:                 71231
 Updated by:         yohgaki@php.net
 Reported by:        zelnaga at gmail dot com
 Summary:            parse_url doesn't urldecode urlencoded characters
 Status:             Open
-Type:               Bug
+Type:               Feature/Change Request
 Package:            URL related
 Operating System:   Windows 7
 PHP Version:        7.0.1
 Block user comment: N
 Private report:     N

 New Comment:

This is not a bug.


Previous Comments:
------------------------------------------------------------------------
[2015-12-28 19:31:07] zelnaga at gmail dot com

Description:
------------
If you urlencode a character in a URL than the parsed version of that URL ought to contain that
character urldecoded in the output.

Test script:
---------------
<?php
$a = parse_url('https://www.google.com/se%61rch?q=test');

print_r($a);

Expected result:
----------------
Array
(
    [scheme] => https
    [host] => www.google.com
    [path] => /search
    [query] => q=test
)

Actual result:
--------------
Array
(
    [scheme] => https
    [host] => www.google.com
    [path] => /se%61rch
    [query] => q=test
)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71231&edit=1


Thread (7 messages)

« previous php.bugs (#198263) next »