note 49226 deleted from function.addcslashes by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 06:52:49 +0000 |
| Subject: | note 49226 deleted from function.addcslashes by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196689@lists.php.net to get a copy of this message | ||
Note Submitter: phpcoder at cyberpimp dot pimpdomain dot com
----
Forgot to add something:
The only time you would likely use addcslashes() without specifying the backslash (\) character in
charlist is when you are VALIDATING (not encoding!) a data string.
(Validation ensures that all control characters and other unsafe characters are correctly encoded /
escaped, but does not alter any pre-existing escape sequences.)
You can validate a data string multiple times without fear of "double encoding". A single
decoding pass will return the original data, regardless of how many times it was validated.)