WordPress.org

Ready to get started?Download WordPress

Forums

Slashes Appearing in Global Variables (2 posts)

  1. Ghidra99
    Member
    Posted 7 years ago #

    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.

  2. Ghidra99
    Member
    Posted 7 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic