Documentation

SimplePie_Sanitize
in package

Table of Contents

Properties

$add_attributes  : mixed
$base  : mixed
$cache_location  : mixed
$cache_name_function  : mixed
$enable_cache  : mixed
$encode_instead_of_strip  : mixed
$force_fsockopen  : mixed
$image_handler  : mixed
$output_encoding  : mixed
$remove_div  : mixed
$replace_url_attributes  : mixed
$strip_attributes  : mixed
$strip_comments  : mixed
$strip_htmltags  : mixed
$timeout  : mixed
$useragent  : mixed

Methods

__construct()  : mixed
add_attributes()  : mixed
pass_cache_data()  : mixed
pass_file_data()  : mixed
remove_div()  : mixed
replace_urls()  : mixed
sanitize()  : mixed
set_image_handler()  : mixed
set_output_encoding()  : mixed
set_registry()  : mixed
set_url_replacements()  : mixed
Set element/attribute key/value pairs of HTML attributes containing URLs that need to be resolved relative to the feed
strip_attributes()  : mixed
strip_comments()  : mixed
strip_htmltags()  : mixed
add_attr()  : mixed
preprocess()  : mixed
strip_attr()  : mixed
strip_tag()  : mixed

Properties

$add_attributes

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

$cache_location

public mixed $cache_location = './cache'

$cache_name_function

public mixed $cache_name_function = 'md5'

$enable_cache

public mixed $enable_cache = \true

$encode_instead_of_strip

public mixed $encode_instead_of_strip = \false

$force_fsockopen

public mixed $force_fsockopen = \false

$image_handler

public mixed $image_handler = ''

$output_encoding

public mixed $output_encoding = 'UTF-8'

$remove_div

public mixed $remove_div = \true

$replace_url_attributes

public mixed $replace_url_attributes = \null

$strip_attributes

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

$strip_comments

public mixed $strip_comments = \false

$strip_htmltags

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

Methods

__construct()

public __construct() : mixed

add_attributes()

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

pass_cache_data()

public pass_cache_data([mixed $enable_cache = true ][, mixed $cache_location = './cache' ][, mixed $cache_name_function = 'md5' ][, mixed $cache_class = 'SimplePie_Cache' ]) : mixed
Parameters
$enable_cache : mixed = true
$cache_location : mixed = './cache'
$cache_name_function : mixed = 'md5'
$cache_class : mixed = 'SimplePie_Cache'

pass_file_data()

public pass_file_data([mixed $file_class = 'SimplePie_File' ][, mixed $timeout = 10 ][, mixed $useragent = '' ][, mixed $force_fsockopen = false ]) : mixed
Parameters
$file_class : mixed = 'SimplePie_File'
$timeout : mixed = 10
$useragent : mixed = ''
$force_fsockopen : mixed = false

remove_div()

public remove_div([mixed $enable = true ]) : mixed
Parameters
$enable : mixed = true

replace_urls()

public replace_urls(mixed $document, mixed $tag, mixed $attributes) : mixed
Parameters
$document : mixed
$tag : mixed
$attributes : mixed

sanitize()

public sanitize(mixed $data, mixed $type[, mixed $base = '' ]) : mixed
Parameters
$data : mixed
$type : mixed
$base : mixed = ''

set_image_handler()

public set_image_handler([mixed $page = false ]) : mixed
Parameters
$page : mixed = false

set_output_encoding()

public set_output_encoding([mixed $encoding = 'UTF-8' ]) : mixed
Parameters
$encoding : mixed = 'UTF-8'

set_url_replacements()

Set element/attribute key/value pairs of HTML attributes containing URLs that need to be resolved relative to the feed

public set_url_replacements([array<string|int, mixed>|null $element_attribute = null ]) : mixed

Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite, |form|@action, |img|@longdesc, |img|@src, |input|@src, |ins|@cite, |q|@cite

Parameters
$element_attribute : array<string|int, mixed>|null = null

Element/attribute key/value pairs, null for default

Tags
since
1.0

strip_attributes()

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

strip_comments()

public strip_comments([mixed $strip = false ]) : mixed
Parameters
$strip : mixed = false

strip_htmltags()

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

add_attr()

protected add_attr(mixed $tag, mixed $valuePairs, mixed $document) : mixed
Parameters
$tag : mixed
$valuePairs : mixed
$document : mixed

preprocess()

protected preprocess(mixed $html, mixed $type) : mixed
Parameters
$html : mixed
$type : mixed

strip_attr()

protected strip_attr(mixed $attrib, mixed $xpath) : mixed
Parameters
$attrib : mixed
$xpath : mixed

strip_tag()

protected strip_tag(mixed $tag, mixed $document, mixed $xpath, mixed $type) : mixed
Parameters
$tag : mixed
$document : mixed
$xpath : mixed
$type : mixed

        
On this page

Search results