Used for data cleanup and post-processing
This class can be overloaded with \SimplePie::set_sanitize_class()
package | SimplePie |
---|---|
todo | Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shorten a string while preserving HTML tags |
__construct()
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
)
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 |
---|
array
null
Element/attribute key/value pairs, null for default
strip_attributes($attribs = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')
)
preprocess($html, $type)
strip_attr($attrib, $document)
strip_tag($tag, $document, $type)
$base
$cache_location
'./cache'
$cache_name_function
'md5'
$enable_cache
true
$encode_instead_of_strip
false
$force_fsockopen
false
$image_handler
''
$output_encoding
'UTF-8'
$remove_div
true
$replace_url_attributes
null
$strip_attributes
array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')
$strip_comments
false
$timeout
10
$useragent
''
strip_comments()
Parameters
$strip