Support » Fixing WordPress » Slashes Appearing in Global Variables

  • So I’ve been trying to hammer out this annoyance today.

    Everything I submit through the $_POST, $_GET, and $_COOKIE global variables is being escaped (back slashes added to apostrophes, quotes, etc.). The strange part about it is I’ve turned off magic_quotes_gpc in my php.ini file and have made sure that my database is encoded in utf8_unicode_ci. Still, no dice.

    This wouldn’t be WordPress still adding the wptexturize() to those variables, would it?

    PS. Sorry for no example, this is on a local test install of WordPress.

Viewing 1 replies (of 1 total)
  • Okay, I need to be more explicit in what I’m reporting.

    When I send a global variable, such as $_POST and call one of the values of its array after submitting it, say using $_POST['name'] back into a script, that’s when the escape slashes appear.

    Like this:

    <label for="name">Name:<br />
    <input name="name" id="name" value="<?php
    if(isset($_POST['name'])) {
    echo $_POST['name'];
    } ?>" />

    Am I doing this wrong? Is WordPress adding something in that I’m not aware of?

Viewing 1 replies (of 1 total)
  • The topic ‘Slashes Appearing in Global Variables’ is closed to new replies.