Support Joomla!

Packages

Package: SimplePie

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 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 shortern a string while preserving HTML tags

Located in /simplepie/simplepie.php (line 10492)

Class SimplePie_Sanitize
Method Summary
Method void do_strip_htmltags ( $match)
Method void encode_instead_of_strip ([ $encode = false])
Method void pass_cache_data ([ $enable_cache = true], [ $cache_location = './cache'], [ $cache_name_function = 'md5'], [ $cache_class = 'SimplePie_Cache'])
Method void pass_file_data ([ $file_class = 'SimplePie_File'], [ $timeout = 10], [ $useragent = ''], [ $force_fsockopen = false])
Method void remove_div ([ $enable = true])
Method void replace_urls ( $data,  $tag,  $attributes)
Method void sanitize ( $data,  $type, [ $base = ''])
Method void set_image_handler ([ $page = false])
Method void set_output_encoding ([ $encoding = 'UTF-8'])
Method 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')])
Method void strip_attributes ([ $attribs = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')])
Method void strip_comments ([ $strip = false])
Method 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 10495)
mixed $cache_class = 'SimplePie_Cache' (line 10508)
mixed $cache_location = './cache' (line 10506)
mixed $cache_name_function = 'md5' (line 10507)
mixed $enable_cache = true (line 10505)
mixed $encode_instead_of_strip = false (line 10501)
mixed $file_class = 'SimplePie_File' (line 10509)
mixed $force_fsockopen = false (line 10512)
mixed $image_handler = '' (line 10499)
mixed $output_encoding = 'UTF-8' (line 10504)
mixed $remove_div = true (line 10498)
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 10514)
mixed $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc') (line 10502)
mixed $strip_comments = false (line 10503)
mixed $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style') (line 10500)
mixed $timeout = 10 (line 10510)
mixed $useragent = '' (line 10511)
Methods
do_strip_htmltags (line 10815)
void do_strip_htmltags ( $match)
  • $match
encode_instead_of_strip (line 10608)
void encode_instead_of_strip ([ $encode = false])
  • $encode
pass_cache_data (line 10543)
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 10566)
void pass_file_data ([ $file_class = 'SimplePie_File'], [ $timeout = 10], [ $useragent = ''], [ $force_fsockopen = false])
  • $file_class
  • $timeout
  • $useragent
  • $force_fsockopen
remove_div (line 10526)
void remove_div ([ $enable = true])
  • $enable
replace_urls (line 10787)
void replace_urls ( $data,  $tag,  $attributes)
  • $data
  • $tag
  • $attributes
sanitize (line 10655)
void sanitize ( $data,  $type, [ $base = ''])
  • $data
  • $type
  • $base
set_image_handler (line 10531)
void set_image_handler ([ $page = false])
  • $page
set_output_encoding (line 10637)
void set_output_encoding ([ $encoding = 'UTF-8'])
  • $encoding
set_url_replacements (line 10650)

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 10613)
void strip_attributes ([ $attribs = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')])
  • $attribs
strip_comments (line 10632)
void strip_comments ([ $strip = false])
  • $strip
strip_htmltags (line 10589)
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 Mon, 22 Sep 2008 12:14:32 +0100 by phpDocumentor 1.3.1