#23063 [Opn->WFx]: Enhancement to urlencode(), rawurlencode()

From: Date: Sat, 05 Apr 2003 18:44:45 +0000
Subject: #23063 [Opn->WFx]: Enhancement to urlencode(), rawurlencode()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37185@lists.php.net to get a copy of this message
ID: 23063 Updated by: pollita@php.net Reported By: mccarthy36 at earthlink dot net -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: All PHP Version: 4.3.1 New Comment: You can achieve the same results using preg_replace: preg_replace('/./e',"sprintf('%%%02X',ord('\\0'))",$foo); The resulting string can be parsed by any RFC compliant query string decoder. Previous Comments: ------------------------------------------------------------------------ [2003-04-05 11:29:14] mccarthy36 at earthlink dot net I'd like to see an optional boolean second argument to urlencode() and rawurlencode() to cause encoding of all characters in the argument string, even alphanumerics. Like this: string urlencode ( string str [, bool encode_all]) string rawurlencode ( string str [, bool encode_all]) Naturally the optional argument would default to false to preserve the current behavior. Thanks ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23063&edit=1

« previous php.bugs (#37185) next »