PHP Class Habari\InputFilter

Show file Open project: habari/system

Public Methods

Method Description
__static ( )
_validate_entity ( array $m ) Callback function for strip_illegal_entities, do not use.
filter ( string $str ) : string Perform all filtering, return new string.
filter_html_elements ( $str )
glue_url ( $parsed_url ) Restore a URL separated by a parse_url() call.
parse_url ( $url ) This really doesn't belong here. It should also be done much better. This is a nasty, NASTY kludge.
strip_illegal_entities ( string $str ) : string Remove illegal entities, return new string.
strip_nulls ( string $str ) : string Remove nulls, return new string.

Private Methods

Method Description
check_attr_value ( $k, $v, $type )

Method Details

__static() public static method

public static __static ( )

_validate_entity() public static method

Callback function for strip_illegal_entities, do not use.
public static _validate_entity ( array $m )
$m array matches

filter() public static method

Perform all filtering, return new string.
public static filter ( string $str ) : string
$str string Input string.
return string Filtered output string.

filter_html_elements() public static method

public static filter_html_elements ( $str )

glue_url() public static method

Restore a URL separated by a parse_url() call.
public static glue_url ( $parsed_url )
$parsed_url array An array as returned by parse_url()

parse_url() public static method

This really doesn't belong here. It should also be done much better. This is a nasty, NASTY kludge.
public static parse_url ( $url )

strip_illegal_entities() public static method

Remove illegal entities, return new string.
public static strip_illegal_entities ( string $str ) : string
$str string Input string.
return string Filtered output string.

strip_nulls() public static method

Remove nulls, return new string.
public static strip_nulls ( string $str ) : string
$str string Input string.
return string Filtered output string.