SimplePie
[ class tree: SimplePie ] [ index: SimplePie ] [ all elements ]

Class: SimplePie_Sanitize

Source Location: /simplepie.inc

Class Overview




Author(s):

Variables

Methods



Class Details

[line 14271]


Tags:

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


[ Top ]


Class Variables

$base =

[line 14274]


Type:   mixed


[ Top ]

$cache_class =  'SimplePie_Cache'

[line 14287]


Type:   mixed


[ Top ]

$cache_location =  './cache'

[line 14285]


Type:   mixed


[ Top ]

$cache_name_function =  'md5'

[line 14286]


Type:   mixed


[ Top ]

$enable_cache =  true

[line 14284]


Type:   mixed


[ Top ]

$encode_instead_of_strip =  false

[line 14280]


Type:   mixed


[ Top ]

$file_class =  'SimplePie_File'

[line 14288]


Type:   mixed


[ Top ]

$force_fsockopen =  false

[line 14291]


Type:   mixed


[ Top ]

$image_handler =  ''

[line 14278]


Type:   mixed


[ Top ]

$output_encoding =  'UTF-8'

[line 14283]


Type:   mixed


[ Top ]

$remove_div =  true

[line 14277]


Type:   mixed


[ Top ]

$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 14293]


Type:   mixed


[ Top ]

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

[line 14281]


Type:   mixed


[ Top ]

$strip_comments =  false

[line 14282]


Type:   mixed


[ Top ]

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

[line 14279]


Type:   mixed


[ Top ]

$timeout =  10

[line 14289]


Type:   mixed


[ Top ]

$useragent =  ''

[line 14290]


Type:   mixed


[ Top ]



Class Methods


method do_strip_htmltags [line 14597]

void do_strip_htmltags( $match)



Parameters:

   $match  

[ Top ]

method encode_instead_of_strip [line 14387]

void encode_instead_of_strip( [ $encode = false])



Parameters:

   $encode  

[ Top ]

method pass_cache_data [line 14322]

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



Parameters:

   $enable_cache  
   $cache_location  
   $cache_name_function  
   $cache_class  

[ Top ]

method pass_file_data [line 14345]

void pass_file_data( [ $file_class = 'SimplePie_File'], [ $timeout = 10], [ $useragent = ''], [ $force_fsockopen = false])



Parameters:

   $file_class  
   $timeout  
   $useragent  
   $force_fsockopen  

[ Top ]

method remove_div [line 14305]

void remove_div( [ $enable = true])



Parameters:

   $enable  

[ Top ]

method replace_urls [line 14567]

void replace_urls( $data, $tag, $attributes)



Parameters:

   $data  
   $tag  
   $attributes  

[ Top ]

method sanitize [line 14434]

void sanitize( $data, $type, [ $base = ''])



Parameters:

   $data  
   $type  
   $base  

[ Top ]

method set_image_handler [line 14310]

void set_image_handler( [ $page = false])



Parameters:

   $page  

[ Top ]

method set_output_encoding [line 14416]

void set_output_encoding( [ $encoding = 'UTF-8'])



Parameters:

   $encoding  

[ Top ]

method set_url_replacements [line 14429]

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')])

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



Tags:

since:  1.0
access:  public


Parameters:

array   $element_attribute   Element/attribute key/value pairs

[ Top ]

method strip_attributes [line 14392]

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



Parameters:

   $attribs  

[ Top ]

method strip_comments [line 14411]

void strip_comments( [ $strip = false])



Parameters:

   $strip  

[ Top ]

method strip_htmltags [line 14368]

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



Parameters:

   $tags  

[ Top ]


Documentation generated on Sat, 16 Aug 2008 07:54:10 -0700 by phpDocumentor 1.3.1