Title: Escape characters
Last modified: August 20, 2016

---

# Escape characters

 *  Resolved [Recon](https://wordpress.org/support/users/recon/)
 * (@recon)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/escape-characters/)
 * Is there a way to stop \backslashes being added before ‘ and ” characters? I 
   am using Contact Form 7.
 * Thanks 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/escape-characters/#post-2111696)
 * You should not be getting those.
 * I have code in there that calls `stripslashes($value)` if `get_magic_quotes_gpc()`.
 * Looking at the docs for [get_magic_quotes_gpc](http://php.net/manual/en/function.get-magic-quotes-gpc.php)
   I see that magic_quotes_sybase can override this. Does that or anything else 
   apply to your configuration?
 *  Thread Starter [Recon](https://wordpress.org/support/users/recon/)
 * (@recon)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/escape-characters/#post-2111768)
 * They appear in the backend, too.
 * I have set up Contact Form 7 so that the data is emailed to me as well as added
   to the database. The backslashes do not appear in the emailed version but they
   are saved into the database.
 * Is it normal for the backslashes to appear in the backend, or should they not
   appear anywhere?
 *  Thread Starter [Recon](https://wordpress.org/support/users/recon/)
 * (@recon)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/escape-characters/#post-2111769)
 * I’ve just found out that my host (Dreamhost) has magic_quotes_gpc [OFF by default](http://wiki.dreamhost.com/PHP_Magic_Quotes).
 * I also noticed that this function has now been [deprecated](http://www.php.net/manual/en/security.magicquotes.php).
 *  [Mike Challis](https://wordpress.org/support/users/mikechallis/)
 * (@mikechallis)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/escape-characters/#post-2111770)
 * Point of clarification.
    WordPress always adds magic quotes regardless of PHP
   server magic_quotes_gpc settings.
 * Since 3.0, the magic is now done in wp-includes/load.php
    function wp_magic_quotes()
 * It is just one of the quirky things they do to be able to support so many different
   servers.
    So you should not use if ( get_magic_quotes_gpc() ) in your plugins
   or you will have unexpected results on the servers with get_magic_quotes_gpc 
   = Off. Just always expect they are on anyway.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/escape-characters/#post-2111804)
 * Thanks Mike, that’s a big help.
 * I put in the change to always call stripslashes. I have another addition in there
   also, so I will push version 1.8.7 today.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Escape characters’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/escape-characters/#post-2111804)
 * Status: resolved