PHP Class SimplePie_Sanitize, simplepie

This class can be overloaded with {@see \SimplePie::set_sanitize_class()}
显示文件 Open project: simplepie/simplepie Class Usage Examples

Public Properties

Property Type Description
$add_attributes
$base Private vars
$cache_location
$cache_name_function
$enable_cache
$encode_instead_of_strip
$force_fsockopen
$image_handler
$output_encoding
$remove_div Options
$replace_url_attributes
$strip_attributes
$strip_comments
$strip_htmltags
$timeout
$useragent

Public Methods

Method Description
__construct ( )
add_attributes ( $attribs = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']] )
do_strip_htmltags ( $match )
encode_instead_of_strip ( $encode = false )
pass_cache_data ( $enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie_Cache' )
pass_file_data ( $file_class = 'SimplePie_File', $timeout = 10, $useragent = '', $force_fsockopen = false )
remove_div ( $enable = true )
replace_urls ( $document, $tag, $attributes )
sanitize ( $data, $type, $base = '' )
set_image_handler ( $page = false )
set_output_encoding ( $encoding = 'UTF-8' )
set_registry ( SimplePie_Registry $registry )
set_url_replacements ( array | null $element_attribute = null ) Set element/attribute key/value pairs of HTML attributes containing URLs that need to be resolved relative to the feed
strip_attributes ( $attribs = ['bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'] )
strip_comments ( $strip = false )
strip_htmltags ( $tags = ['base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'] )

Protected Methods

Method Description
add_attr ( $tag, $valuePairs, $document )
preprocess ( $html, $type )
strip_attr ( $attrib, $xpath )
strip_tag ( $tag, $document, $xpath, $type )

Method Details

__construct() public method

public __construct ( )

add_attr() protected method

protected add_attr ( $tag, $valuePairs, $document )

add_attributes() public method

public add_attributes ( $attribs = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']] )

do_strip_htmltags() public method

public do_strip_htmltags ( $match )

encode_instead_of_strip() public method

public encode_instead_of_strip ( $encode = false )

pass_cache_data() public method

public pass_cache_data ( $enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie_Cache' )

pass_file_data() public method

public pass_file_data ( $file_class = 'SimplePie_File', $timeout = 10, $useragent = '', $force_fsockopen = false )

preprocess() protected method

protected preprocess ( $html, $type )

remove_div() public method

public remove_div ( $enable = true )

replace_urls() public method

public replace_urls ( $document, $tag, $attributes )

sanitize() public method

public sanitize ( $data, $type, $base = '' )

set_image_handler() public method

public set_image_handler ( $page = false )

set_output_encoding() public method

public set_output_encoding ( $encoding = 'UTF-8' )

set_registry() public method

public set_registry ( SimplePie_Registry $registry )
$registry SimplePie_Registry

set_url_replacements() public method

Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite, |form|@action, |img|@longdesc, |img|@src, |input|@src, |ins|@cite, |q|@cite
Since: 1.0
public set_url_replacements ( array | null $element_attribute = null )
$element_attribute array | null Element/attribute key/value pairs, null for default

strip_attr() protected method

protected strip_attr ( $attrib, $xpath )

strip_attributes() public method

public strip_attributes ( $attribs = ['bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'] )

strip_comments() public method

public strip_comments ( $strip = false )

strip_htmltags() public method

public strip_htmltags ( $tags = ['base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'] )

strip_tag() protected method

protected strip_tag ( $tag, $document, $xpath, $type )

Property Details

$add_attributes public_oe property

public $add_attributes

$base public_oe property

Private vars
public $base

$cache_location public_oe property

public $cache_location

$cache_name_function public_oe property

public $cache_name_function

$enable_cache public_oe property

public $enable_cache

$encode_instead_of_strip public_oe property

public $encode_instead_of_strip

$force_fsockopen public_oe property

public $force_fsockopen

$image_handler public_oe property

public $image_handler

$output_encoding public_oe property

public $output_encoding

$remove_div public_oe property

Options
public $remove_div

$replace_url_attributes public_oe property

public $replace_url_attributes

$strip_attributes public_oe property

public $strip_attributes

$strip_comments public_oe property

public $strip_comments

$strip_htmltags public_oe property

public $strip_htmltags

$timeout public_oe property

public $timeout

$useragent public_oe property

public $useragent