note 89785 added to function.stripslashes
| From: | TomWorster at osu1 dot php dot net | Date: | Mon, 23 Mar 2009 15:26:23 +0000 |
| Subject: | note 89785 added to function.stripslashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152332@lists.php.net to get a copy of this message | ||
A replacement that should be safe on utf-8 strings.
<?php
preg_replace(array('/\x5C(?!\x5C)/u', '/\x5C\x5C/u'),
array('','\\'), $s);
?>
----
Server IP: 209.41.74.194
Probable Submitter: 76.119.107.102
----
Manual Page -- http://www.php.net/manual/en/function.stripslashes.php
Edit -- https://master.php.net/note/edit/89785
Del: integrated -- https://master.php.net/note/delete/89785/integrated
Del: useless -- https://master.php.net/note/delete/89785/useless
Del: bad code -- https://master.php.net/note/delete/89785/bad+code
Del: spam -- https://master.php.net/note/delete/89785/spam
Del: non-english -- https://master.php.net/note/delete/89785/non-english
Del: in docs -- https://master.php.net/note/delete/89785/in+docs
Del: other reasons-- https://master.php.net/note/delete/89785
Reject -- https://master.php.net/note/reject/89785
Search -- https://master.php.net/manage/user-notes.php