PHP 4.0 Bug #6878: urldecode() treats incoming %27's incorrectly

From: Date: Mon, 25 Sep 2000 15:12:24 +0000
Subject: PHP 4.0 Bug #6878: urldecode() treats incoming %27's incorrectly
Groups: php.dev 
Request: Send a blank email to php-dev+get-33676@lists.php.net to get a copy of this message
From: philnmarie@mail.com Operating system: Linux 2.4.0-test4 (RH 6.2) PHP version: 4.0.2 PHP Bug Type: Strings related Bug description: urldecode() treats incoming %27's incorrectly When a perl script passes variables on the url in a "Location:" header, any %27s (apostrophes) are returned as \' (backslash apost). However, when doing a urldecode(urlencode("test'ing")), "test'ing" is returned. I kluged it with "$title = preg_replace("/\\\'/","'",urldecode($title))" for now. I've verified that the perl script is requesting "somescript.php?title=test%27ing" in the browser location bar, too. I've seen the other reports of something similar to this (#1765, mainly), but it did not seem to address 'incoming' variables, just ones generated from other PHP scripts. The files that this is happening with are not done well at all right now (UGLY!), but if they would be of use, please let me know.

« previous php.dev (#33676) next »