Class SimplePie_Sanitize

Description
  • 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

Located in /libraries/simplepie/simplepie.php (line 14655)


	
			
Variable Summary
Method Summary
 void do_strip_htmltags ( $match)
 void encode_instead_of_strip ([ $encode = false])
 void pass_cache_data ([ $enable_cache = true], [ $cache_location = './cache'], [ $cache_name_function = 'md5'], [ $cache_class = 'SimplePie_Cache'])
 void pass_file_data ([ $file_class = 'SimplePie_File'], [ $timeout = 10], [ $useragent = ''], [ $force_fsockopen = false])
 void remove_div ([ $enable = true])
 void replace_urls ( $data,  $tag,  $attributes)
 void sanitize ( $data,  $type, [ $base = ''])
 void set_image_handler ([ $page = false])
 void set_output_encoding ([ $encoding = 'UTF-8'])
 void set_url_replacements ([array $element_attribute = array('a' => 'href', 'area' => 'href', 'blockquote' => 'cite', 'del' => 'cite', 'form' => 'action', 'img' => array('longdesc', 'src'),'input'=>'src','ins'=>'cite','q'=>'cite')])
 void strip_attributes ([ $attribs = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')])
 void strip_comments ([ $strip = false])
 void strip_htmltags ([ $tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style')])
Variables
mixed $base (line 14658)
mixed $cache_class = 'SimplePie_Cache' (line 14671)
mixed $cache_location = './cache' (line 14669)
mixed $cache_name_function = 'md5' (line 14670)
mixed $enable_cache = true (line 14668)
mixed $encode_instead_of_strip = false (line 14664)
mixed $file_class = 'SimplePie_File' (line 14672)
mixed $force_fsockopen = false (line 14675)
mixed $image_handler = '' (line 14662)
mixed $output_encoding = 'UTF-8' (line 14667)
mixed $remove_div = true (line 14661)
mixed $replace_url_attributes = array(
'a' => 'href',
'area' => 'href',
'blockquote' => 'cite',
'del' => 'cite',
'form' => 'action',
'img' => array('longdesc', 'src'),'input'=>'src','ins'=>'cite','q'=>'cite')
(line 14677)
mixed $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc') (line 14665)
mixed $strip_comments = false (line 14666)
mixed $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style') (line 14663)
mixed $timeout = 10 (line 14673)
mixed $useragent = '' (line 14674)
Methods
do_strip_htmltags (line 14981)
void do_strip_htmltags ( $match)
  • $match
encode_instead_of_strip (line 14771)
void encode_instead_of_strip ([ $encode = false])
  • $encode
pass_cache_data (line 14706)
void pass_cache_data ([ $enable_cache = true], [ $cache_location = './cache'], [ $cache_name_function = 'md5'], [ $cache_class = 'SimplePie_Cache'])
  • $enable_cache
  • $cache_location
  • $cache_name_function
  • $cache_class
pass_file_data (line 14729)
void pass_file_data ([ $file_class = 'SimplePie_File'], [ $timeout = 10], [ $useragent = ''], [ $force_fsockopen = false])
  • $file_class
  • $timeout
  • $useragent
  • $force_fsockopen
remove_div (line 14689)
void remove_div ([ $enable = true])
  • $enable
replace_urls (line 14951)
void replace_urls ( $data,  $tag,  $attributes)
  • $data
  • $tag
  • $attributes
sanitize (line 14818)
void sanitize ( $data,  $type, [ $base = ''])
  • $data
  • $type
  • $base
set_image_handler (line 14694)
void set_image_handler ([ $page = false])
  • $page
set_output_encoding (line 14800)
void set_output_encoding ([ $encoding = 'UTF-8'])
  • $encoding
set_url_replacements (line 14813)

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

  • since: 1.0
  • access: public
void set_url_replacements ([array $element_attribute = array('a' => 'href', 'area' => 'href', 'blockquote' => 'cite', 'del' => 'cite', 'form' => 'action', 'img' => array('longdesc', 'src'),'input'=>'src','ins'=>'cite','q'=>'cite')])
  • array $element_attribute: Element/attribute key/value pairs
strip_attributes (line 14776)
void strip_attributes ([ $attribs = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')])
  • $attribs
strip_comments (line 14795)
void strip_comments ([ $strip = false])
  • $strip
strip_htmltags (line 14752)
void strip_htmltags ([ $tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style')])
  • $tags

Documentation generated on Tue, 19 Nov 2013 15:13:50 +0100 by phpDocumentor 1.4.3