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

Class: SimplePie_Sanitize

Source Location: /modules/Feeds/pnincludes/simplepie.inc

Class Overview




Author(s):

Variables

Methods



Class Details

[line 12917]


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


[ Top ]


Class Variables

$base =

[line 12920]


Type:   mixed


[ Top ]

$cache_class =  'SimplePie_Cache'

[line 12933]


Type:   mixed


[ Top ]

$cache_location =  './cache'

[line 12931]


Type:   mixed


[ Top ]

$cache_name_function =  'md5'

[line 12932]


Type:   mixed


[ Top ]

$enable_cache =  true

[line 12930]


Type:   mixed


[ Top ]

$encode_instead_of_strip =  false

[line 12926]


Type:   mixed


[ Top ]

$file_class =  'SimplePie_File'

[line 12934]


Type:   mixed


[ Top ]

$force_fsockopen =  false

[line 12937]


Type:   mixed


[ Top ]

$image_handler =  ''

[line 12924]


Type:   mixed


[ Top ]

$output_encoding =  'UTF-8'

[line 12929]


Type:   mixed


[ Top ]

$remove_div =  true

[line 12923]


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 12939]


Type:   mixed


[ Top ]

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

[line 12927]


Type:   mixed


[ Top ]

$strip_comments =  false

[line 12928]


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 12925]


Type:   mixed


[ Top ]

$timeout =  10

[line 12935]


Type:   mixed


[ Top ]

$useragent =  ''

[line 12936]


Type:   mixed


[ Top ]



Class Methods


method do_strip_htmltags [line 13243]

void do_strip_htmltags( $match)



Parameters:

   $match  

[ Top ]

method encode_instead_of_strip [line 13033]

void encode_instead_of_strip( [ $encode = false])



Parameters:

   $encode  

[ Top ]

method pass_cache_data [line 12968]

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 12991]

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 12951]

void remove_div( [ $enable = true])



Parameters:

   $enable  

[ Top ]

method replace_urls [line 13213]

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



Parameters:

   $data  
   $tag  
   $attributes  

[ Top ]

method sanitize [line 13080]

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



Parameters:

   $data  
   $type  
   $base  

[ Top ]

method set_image_handler [line 12956]

void set_image_handler( [ $page = false])



Parameters:

   $page  

[ Top ]

method set_output_encoding [line 13062]

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



Parameters:

   $encoding  

[ Top ]

method set_url_replacements [line 13075]

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 13038]

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 13057]

void strip_comments( [ $strip = false])



Parameters:

   $strip  

[ Top ]

method strip_htmltags [line 13014]

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 Fri, 18 Jul 2008 21:57:56 +0200 by phpDocumentor 1.4.1