• Resolved Mark Hodder

    (@mahodder)


    I have an issue where WP seems to insert \ in front of any ” or ‘ characters. It does not do this on the posts or pages but it does do it when I receive an e-mail from my contact form (GPixel-Contact plugin).

    This isn’t so bad but I have also integrated a forum into my WP site. Any posts in the forum also have a \ placed in front of any quotations.

    Why does WP do this? Is there any way to turn this off or does it serve some purpose?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Mark Hodder

    (@mahodder)

    No ideas?

    but it does do it when I receive an e-mail from my contact form (GPixel-Contact plugin).

    Contact the plugin author.

    They forgot to put in “stripslashes” in the code. I don’t know the code, or I’d tell you where to put it – so you need to contact the plugin author and inform them.

    Why does WP do this?

    WP *doesn’t* do this. PHP does if the command to strip the slashes isn’t put in the form code. It’s a PHP thing, not a WordPress thing.

    Thread Starter Mark Hodder

    (@mahodder)

    So is there any global option in PHP to turn this off? When people are posting in my forum it also inserts \ in front of any quotes. It didn’t start to do this until I integrated WP functions into my forum.

    “So is there any global option in PHP to turn this off?”

    Yes, there is. Change magic_quotes_gpc to off.

    Thread Starter Mark Hodder

    (@mahodder)

    Thank you! I will give that a try.

    Thread Starter Mark Hodder

    (@mahodder)

    hmmmm magic_quotes_gpc are already off, guess that wasn’t it 🙁

    Thread Starter Mark Hodder

    (@mahodder)

    The slash problem seems to be caused by the fact that recent versions of WordPress slash everything that gets posted. Unfortunately, Vanilla isn’t expecting this.

    You can keep these slashes from appearing by adding, the following lines at the end of your Vanilla database.php file:

    $_GET = stripslashes_deep($_GET );
    $_POST = stripslashes_deep($_POST );
    $_COOKIE = stripslashes_deep($_COOKIE);

    Author of above code: filosofo

    Finally a workaround!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP Inserting \ in front of ” or ‘’ is closed to new replies.