#19947 [NEW]: stripslashes strips TOO much (\n)

From: Date: Thu, 17 Oct 2002 06:52:19 +0000
Subject: #19947 [NEW]: stripslashes strips TOO much (\n)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22640@lists.php.net to get a copy of this message
From: fil@rezox.com Operating system: Linux RedHat PHP version: 4.2.1 PHP Bug Type: Strings related Bug description: stripslashes strips TOO much (\n) 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 bug report at http://bugs.php.net/?id=19947&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19947&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19947&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19947&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19947&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19947&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19947&r=support Expected behavior: http://bugs.php.net/fix.php?id=19947&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19947&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19947&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19947&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19947&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19947&r=dst IIS Stability: http://bugs.php.net/fix.php?id=19947&r=isapi

« previous php.bugs (#22640) next »