1 Sep 2006 johnnyb   » (Journeyer)

What to do if you can't turn off magic_quotes_gpc on your host:

if(get_magic_quotes_gpc()) {
        foreach($_REQUEST as $key => $value) {
                if(is_array($_REQUEST[$key])) {
                        $_REQUEST[$key] = array_map("stripslashes", $_REQUEST[$key]);
                } else {
                        $_REQUEST[$key] = stripslashes($_REQUEST[$key]);
                }
        }
        foreach($_POST as $key => $value) {
                if(is_array($_POST[$key])) {
                        $_POST[$key] = array_map("stripslashes", $_POST[$key]);
                } else {
                        $_POST[$key] = stripslashes($_POST[$key]);
                }
        }
        foreach($_GET as $key => $value) {
                if(is_array($_GET[$key])) {
                        $_GET[$key] = array_map("stripslashes", $_GET[$key]);
                } else { 
                        $_GET[$key] = stripslashes($_GET[$key]);
                }
        }
}  

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!