function kses($string, $allowed_html, $allowed_protocols = array('http', 'https', 'ftp', 'news', 'nntp', 'telnet', 'gopher', 'mailto'))
{
    $string = kses_no_null($string);
    $string = kses_js_entities($string);
    $string = kses_normalize_entities($string);
    $string = kses_hook($string);
    $allowed_html_fixed = kses_array_lc($allowed_html);
    return kses_split($string, $allowed_html_fixed, $allowed_protocols);
}
Example #2
0
function kses($string, $allowed_html, $allowed_protocols = array('http', 'https', 'ftp', 'news', 'nntp', 'telnet', 'gopher', 'mailto'))
{
    $string = kses_no_null($string);
    $string = kses_js_entities($string);
    //  $string = kses_normalize_entities($string); Zenphoto does not want & encoded
    $string = kses_hook($string);
    //  $allowed_html = kses_array_lc($allowed_html); Zenphoto insures that these are already lowercase
    return kses_split($string, $allowed_html, $allowed_protocols);
}
Example #3
0
function kses($string, $allowed_html = false, $allowed_protocols = array('http', 'https', 'ftp', 'mailto', 'color', 'background-color'))
{
    //'news', 'nntp', 'telnet', 'gopher',
    $string = kses_no_null($string);
    $string = kses_js_entities($string);
    $string = kses_normalize_entities($string);
    $string = kses_hook($string);
    $allowed_html_fixed = kses_array_lc($allowed_html !== false ? $allowed_html : $GLOBALS['allowed_html']);
    return kses_split($string, $allowed_html_fixed, $allowed_protocols);
}
Example #4
0
function kses($string, $allowed_html, $allowed_protocols = array('http', 'https', 'ftp', 'news', 'nntp', 'telnet', 'gopher', 'mailto'))
{
    ###############################################################################
    # This function makes sure that only the allowed HTML element names, attribute
    # names and attribute values plus only sane HTML entities will occur in
    # $string. You have to remove any slashes from PHP's magic quotes before you
    # call this function.
    ###############################################################################
    $string = kses_no_null($string);
    $string = kses_js_entities($string);
    //  $string = kses_normalize_entities($string); //update// does not want & encoded
    $string = kses_hook($string);
    //  $allowed_html = kses_array_lc($allowed_html); //update// insures that these are already lowercase
    return kses_split($string, $allowed_html, $allowed_protocols);
}