/**
 * Reads all values from the Request Object either adding slashes or 
 * Removing them based on preference.
 *
 * @param string $buffer the text to remove slashes from.
 *
 * @return string $buffer the converted string.
 */
function parse_incoming($addslashes = false)
{
    global $_REQUEST;
    if ($addslashes) {
        return my_addslashes($_REQUEST);
    } else {
        return my_stripslashes($_REQUEST);
    }
}
示例#2
0
function stripslashes_array(&$a)
{
    if (is_array($a)) {
        foreach ($a as $k => $v) {
            my_stripslashes($a[$k]);
        }
    } else {
        $a = stripslashes($a);
    }
}