#19947 [Opn->Bgs]: stripslashes strips TOO much (\n)
| From: | sniper@php.net | Date: | Thu, 17 Oct 2002 10:05:59 +0000 |
| Subject: | #19947 [Opn->Bgs]: stripslashes strips TOO much (\n) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22650@lists.php.net to get a copy of this message | ||
ID: 19947
Updated by: sniper@php.net
Reported By: fil@rezox.com
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Linux RedHat
PHP Version: 4.2.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2002-10-17 01:52:19] fil@rezox.com
Stripslashes should symmetric to addslashes( which adds \ to ',",\,0x0
).
However running Stripslashes on the following example causes the \" AND
the \n to have slashes stripped. This makes it non-symmetric and
somewhat useless in these situations.
Sample:
$test = 'header( \"Location: $NewURL\n\" );';
$test2 = stripslashes($test);
Given Result:
header( "Location: $NewURLn" );
Expected result:
header( "Location: $NewURL\n" );
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19947&edit=1