thirdparty/htmlpurifier-4.0.0-lite/library/HTMLPurifier/Config.php
public static function prepareArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true, $schema = null) {
        if ($index !== false) $array = (isset($array[$index]) && is_array($array[$index])) ? $array[$index] : array();
        $mq = $mq_fix && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc();

        $allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $schema);
        $ret = array();
        foreach ($allowed as $key) {
            list($ns, $directive) = $key;
            $skey = "$ns.$directive";
            if (!empty($array["Null_$skey"])) {
                $ret[$ns][$directive] = null;
                continue;
            }
            if (!isset($array[$skey])) continue;
            $value = $mq ? stripslashes($array[$skey]) : $array[$skey];
            $ret[$ns][$directive] = $value;
        }
        return $ret;
    }
public static function prepareArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true, $schema = null) {
        if ($index !== false) $array = (isset($array[$index]) && is_array($array[$index])) ? $array[$index] : array();
        $mq = $mq_fix && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc();

        $allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $schema);
        $ret = array();
        foreach ($allowed as $key) {
            list($ns, $directive) = $key;
            $skey = "$ns.$directive";
            if (!empty($array["Null_$skey"])) {
                $ret[$ns][$directive] = null;
                continue;
            }
            if (!isset($array[$skey])) continue;
            $value = $mq ? stripslashes($array[$skey]) : $array[$skey];
            $ret[$ns][$directive] = $value;
        }
        return $ret;
    }
public static function prepareArrayFromForm ( $ array , $ index = false , $ allowed = true , $ mq_fix = true , $ schema = null ) { if ( $ index !== false ) $ array = ( isset ( $ array [ $ index ] ) && is_array ( $ array [ $ index ] ) ) ? $ array [ $ index ] : array ( ) ; $ mq = $ mq_fix && function_exists ( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc ( ) ; $ allowed = HTMLPurifier_Config :: getAllowedDirectivesForForm ( $ allowed , $ schema ) ; $ ret = array ( ) ; foreach ( $ allowed as $ key ) { list ( $ ns , $ directive ) = $ key ; $ skey = "$ns.$directive" ; if ( ! empty ( $ array [ "Null_$skey" ] ) ) { $ ret [ $ ns ] [ $ directive ] = null ; continue ; } if ( ! isset ( $ array [ $ skey ] ) ) continue ; $ value = $ mq ? stripslashes ( $ array [ $ skey ] ) : $ array [ $ skey ] ; $ ret [ $ ns ] [ $ directive ] = $ value ; } return $ ret ; }
Prepares an array from a form into something usable for the more
strict parts of HTMLPurifier_Config
Prepares an array from a form into something usable for the more strict parts of HTMLPurifier_Config