note 45556 added to function.stripslashes

From: Date: Fri, 10 Sep 2004 15:51:26 +0000
Subject: note 45556 added to function.stripslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-76415@lists.php.net to get a copy of this message
It should be of note that if you are stripping slashes to get rid of the slashes added by magic_quotes_gpc then it will also remove slashes from \. This may not seem that bad but if you have someone enter text such as 'testing\' with a slash at the end, this will cause an error if not corrected. It's best to strip the slashes, then add a slash to every single slash using $text = str_replace('\\', '\\\\', $text); ---- Manual Page -- http://www.php.net/manual/en/function.stripslashes.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45556 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45556&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45556&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76415) next »