Skip to content

SimplePie_Sanitize

Used for data cleanup and post-processing

  • Full name: \SimplePie_Sanitize
  • Parent class: \SimplePie\Sanitize
  • Warning: this class is deprecated. This means that this class will likely be removed in a future version.

Inherited methods

__construct

public __construct(): mixed

remove_div

public remove_div(mixed $enable = true): mixed

Parameters:

Parameter Type Description
$enable mixed

set_image_handler

public set_image_handler(mixed $page = false): mixed

Parameters:

Parameter Type Description
$page mixed

set_registry

Set the Registry into the class

public set_registry(\SimplePie\Registry $registry): void

Parameters:

Parameter Type Description
$registry \SimplePie\Registry

pass_cache_data

public pass_cache_data(mixed $enable_cache = true, mixed $cache_location = './cache', mixed $cache_name_function = 'md5', mixed $cache_class = 'SimplePieCache', \SimplePie\Cache\DataCache $cache = null): mixed

Parameters:

Parameter Type Description
$enable_cache mixed
$cache_location mixed
$cache_name_function mixed
$cache_class mixed
$cache \SimplePie\Cache\DataCache

pass_file_data

public pass_file_data(mixed $file_class = 'SimplePieFile', mixed $timeout = 10, mixed $useragent = '', mixed $force_fsockopen = false): mixed

Parameters:

Parameter Type Description
$file_class mixed
$timeout mixed
$useragent mixed
$force_fsockopen mixed

strip_htmltags

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

Parameters:

Parameter Type Description
$tags mixed

encode_instead_of_strip

public encode_instead_of_strip(mixed $encode = false): mixed

Parameters:

Parameter Type Description
$encode mixed

rename_attributes

public rename_attributes(mixed $attribs = []): mixed

Parameters:

Parameter Type Description
$attribs mixed

strip_attributes

public strip_attributes(mixed $attribs = ['bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc']): mixed

Parameters:

Parameter Type Description
$attribs mixed

add_attributes

public add_attributes(mixed $attribs = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']]): mixed

Parameters:

Parameter Type Description
$attribs mixed

strip_comments

public strip_comments(mixed $strip = false): mixed

Parameters:

Parameter Type Description
$strip mixed

set_output_encoding

public set_output_encoding(mixed $encoding = 'UTF-8'): mixed

Parameters:

Parameter Type Description
$encoding mixed

set_url_replacements

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

public set_url_replacements(array|null $element_attribute = null): mixed

Defaults to |a|@href, |area|@href, |audio|@src, |blockquote|@cite, |del|@cite, |form|@action, |img|@longdesc, |img|@src, |input|@src, |ins|@cite, |q|@cite, |source|@src, |video|@src

Parameters:

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

set_https_domains

Set the list of domains for which to force HTTPS.

public set_https_domains(mixed $domains): mixed

Parameters:

Parameter Type Description
$domains mixed

See Also:

  • \SimplePie\Misc::https_url() - Example array('biz', 'example.com', 'example.org', 'www.example.net');

is_https_domain

Check if the domain is in the list of forced HTTPS.

protected is_https_domain(mixed $domain): mixed

Parameters:

Parameter Type Description
$domain mixed

https_url

Force HTTPS for selected Web sites.

public https_url(mixed $url): mixed

Parameters:

Parameter Type Description
$url mixed

sanitize

public sanitize(mixed $data, mixed $type, mixed $base = ''): mixed

Parameters:

Parameter Type Description
$data mixed
$type mixed
$base mixed

preprocess

protected preprocess(mixed $html, mixed $type): mixed

Parameters:

Parameter Type Description
$html mixed
$type mixed

replace_urls

public replace_urls(mixed $document, mixed $tag, mixed $attributes): mixed

Parameters:

Parameter Type Description
$document mixed
$tag mixed
$attributes mixed

do_strip_htmltags

public do_strip_htmltags(mixed $match): mixed

Parameters:

Parameter Type Description
$match mixed

strip_tag

protected strip_tag(mixed $tag, mixed $document, mixed $xpath, mixed $type): mixed

Parameters:

Parameter Type Description
$tag mixed
$document mixed
$xpath mixed
$type mixed

strip_attr

protected strip_attr(mixed $attrib, mixed $xpath): mixed

Parameters:

Parameter Type Description
$attrib mixed
$xpath mixed

rename_attr

protected rename_attr(mixed $attrib, mixed $xpath): mixed

Parameters:

Parameter Type Description
$attrib mixed
$xpath mixed

add_attr

protected add_attr(mixed $tag, mixed $valuePairs, mixed $document): mixed

Parameters:

Parameter Type Description
$tag mixed
$valuePairs mixed
$document mixed

get_cache

Get a DataCache

private get_cache(string $image_url = ''): \SimplePie\Cache\DataCache

Parameters:

Parameter Type Description
$image_url string Only needed for BC, can be removed in SimplePie 2.0.0


Automatically generated on 2025-03-18