Overview

Packages

  • None
  • SimplePie

Classes

  • SimplePie
  • SimplePie_Author
  • SimplePie_Autoloader
  • SimplePie_Cache
  • SimplePie_Cache_DB
  • SimplePie_Cache_File
  • SimplePie_Cache_Memcache
  • SimplePie_Cache_MySQL
  • SimplePie_Caption
  • SimplePie_Category
  • SimplePie_Content_Type_Sniffer
  • SimplePie_Copyright
  • SimplePie_Core
  • SimplePie_Credit
  • SimplePie_Decode_HTML_Entities
  • SimplePie_Enclosure
  • SimplePie_File
  • SimplePie_gzdecode
  • SimplePie_HTTP_Parser
  • SimplePie_IRI
  • SimplePie_Item
  • SimplePie_Locator
  • SimplePie_Misc
  • SimplePie_Net_IPv6
  • SimplePie_Parse_Date
  • SimplePie_Parser
  • SimplePie_Rating
  • SimplePie_Registry
  • SimplePie_Restriction
  • SimplePie_Sanitize
  • SimplePie_Source
  • SimplePie_XML_Declaration_Parser

Interfaces

  • SimplePie_Cache_Base
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class SimplePie_Sanitize

Used for data cleanup and post-processing

This class can be overloaded with SimplePie_Core::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
Located at SimplePie/Sanitize.php
Methods summary
public
# remove_div( $enable = true )
public
# set_image_handler( $page = false )
public
# set_registry( SimplePie_Registry & $registry )
public
# pass_cache_data( $enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie_Cache' )
public
# pass_file_data( $file_class = 'SimplePie_File', $timeout = 10, $useragent = '', $force_fsockopen = false )
public
# strip_htmltags( $tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style') )
public
# encode_instead_of_strip( $encode = false )
public
# strip_attributes( $attribs = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc') )
public
# strip_comments( $strip = false )
public
# set_output_encoding( $encoding = 'UTF-8' )
public
# 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

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

Parameters

$element_attribute
array
Element/attribute key/value pairs

Since

1.0
public
# sanitize( $data, $type, $base = '' )
protected
# preprocess( $html, $type )
public
# replace_urls( & $document, $tag, $attributes )
public
# do_strip_htmltags( $match )
protected
# strip_tag( $tag, & $document, $type )
protected
# strip_attr( $attrib, & $document )
Properties summary
public $base
#
public boolean $remove_div true
#
public string $image_handler ''
#
public array $strip_htmltags array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style')
#
public boolean $encode_instead_of_strip false
#
public array $strip_attributes array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')
#
public boolean $strip_comments false
#
public string $output_encoding 'UTF-8'
#
public boolean $enable_cache true
#
public string $cache_location './cache'
#
public string $cache_name_function 'md5'
#
public integer $timeout 10
#
public string $useragent ''
#
public boolean $force_fsockopen false
#
public array $replace_url_attributes array( 'a' => 'href', 'area' => 'href', 'blockquote' => 'cite', 'del' => 'cite', 'form' => 'action', 'img' => array('longdesc', 'src'), 'input' => 'src', 'ins' => 'cite', 'q' => 'cite' )
#
SimplePie Documentation API documentation generated by ApiGen 2.4.0