SimplePie: PHP-based RSS and Atom feed handling
 
  • Overview
  • Demo
  • Blog
  • Download
  • Documentation
  • API Docs
  • Support
  • Issue Tracker
  • FAQ
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • SimplePie
    • API
    • Caching
    • HTTP
    • Parsing

Classes

  • SimplePie_Decode_HTML_Entities
  • SimplePie_Locator
  • SimplePie_Misc
  • SimplePie_Registry
  • SimplePie_Sanitize

Class SimplePie_Sanitize

Used for data cleanup and post-processing

This class can be overloaded with SimplePie::set_sanitize_class()

Package: SimplePie
Copyright: 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
License: BSD License
Author: Ryan Parman
Author: Geoffrey Sneddon
Author: Ryan McCue
Located at SimplePie/Sanitize.php
Methods summary
public
# __construct( )
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|null $element_attribute = null )

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

Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite,

form @action, img @longdesc, img @src, input @src, ins @cite,
q @cite                

Parameters

$element_attribute
array|null
Element/attribute key/value pairs, null for default

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 $replace_url_attributes null
#

Show some love! Wishlists for Geoffrey, Ryan P., and Ryan M.

SimplePie is © 2004–2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue and contributors. Licensed under the BSD License. Hosted thanks to Matt Mullenweg, API documentation generated by ApiGen 2.6.1. Variation on the Feed Icon by Wolfgang Bartelme.