note 46020 deleted from function.stripslashes by betz
| From: | betz@php.net | Date: | Mon, 27 Sep 2004 09:32:32 +0000 |
| Subject: | note 46020 deleted from function.stripslashes by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77426@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Also note that this function will remove any and all slashes, including those you may want to keep.
While it correctly transforms \' into ', it will also turn a linefeed (\n) into an
"n".
Likewise, the addslashes function blindly adds slashes, whether it needs to or not. It will happily
turn \' (an already escaped ') into \\\'.
Nightmare. If you read and write strings from/to a database extensively, you are probably better of
writing your own, smart string handling function.