Title: [Plugin: Post Snippets] error with php code
Last modified: August 20, 2016

---

# [Plugin: Post Snippets] error with php code

 *  Resolved [Website Academy](https://wordpress.org/support/users/rfmcomposer/)
 * (@rfmcomposer)
 * [14 years ago](https://wordpress.org/support/topic/plugin-post-snippets-error-with-php-code/)
 * Hi,
 * Thanks for this wonderful plugin!
 * I have one problem though when I enter the following code:
 *     ```
       $email = addSlashes(str_replace(array('\r', '\n', '\\', '/', '..'), '', $_GET['email'])); // protects against System File & Source Code Disclosure, Null Byte Injection and HTTP Header Injection
       ```
   
 * The backslashes and dots seem to be the problem.
 * What can I do to get this working?
 * [http://wordpress.org/extend/plugins/post-snippets/](http://wordpress.org/extend/plugins/post-snippets/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Website Academy](https://wordpress.org/support/users/rfmcomposer/)
 * (@rfmcomposer)
 * [14 years ago](https://wordpress.org/support/topic/plugin-post-snippets-error-with-php-code/#post-2800288)
 * I checked the plugin code and found the solution myself.
 * The function function _php\_eval_ calls _stripslashes()_.
 * To get my code working I had to add a few extra backslashes:
 * `$email = addSlashes(str_replace(array('\\r', '\\n', '\\\\', '/', '..'), '', 
   $_GET['email'])); // protects against System File & Source Code Disclosure, Null
   Byte Injection and HTTP Header Injection`

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Post Snippets] error with php code’ is closed to new replies.

 * ![](https://ps.w.org/post-snippets/assets/icon-128x128.gif?rev=2545587)
 * [Post Snippets - Custom WordPress Code Snippets Customizer](https://wordpress.org/plugins/post-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/post-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-snippets/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 1 participant
 * Last reply from: [Website Academy](https://wordpress.org/support/users/rfmcomposer/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-post-snippets-error-with-php-code/#post-2800288)
 * Status: resolved