wp-includes/SimplePie/src/Sanitize.php:63Used for data cleanup and post-processing
$basepublic$remove_divpublic$image_handlerpublic$strip_htmltagspublic$encode_instead_of_strippublic$strip_attributespublic$rename_attributespublic$add_attributespublic$strip_commentspublic$output_encodingpublic$enable_cachepublic$cache_locationpublic$cache_name_functionpublic$cache_namefilterSimplePie\Cache\NameFilterprivate$timeoutpublic$useragentpublic$force_fsockopenpublic$replace_url_attributespublic$registrypublic$cacheSimplePie\Cache\DataCache|nullprivate$cache_durationintprivate$https_domainspublicclass Sanitize implements RegistryAware{ // Private vars public $base; // Options public $remove_div = true; public $image_handler = ''; public $strip_htmltags = ['base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style']; public $encode_instead_of_strip = false; public $strip_attributes = ['bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc']; public $rename_attributes = []; public $add_attributes = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']]; public $strip_comments = false; public $output_encoding = 'UTF-8'; public $enable_cache = true; public $cache_location = './cache'; public $cache_name_function = 'md5'; /** * @var NameFilter */ private $cache_namefilter; public $timeout = 10; public $useragent = ''; public $force_fsockopen = false; public $replace_url_attributes = null; public $registry; /** * @var DataCache|null */ private $cache = null; /** * @var int Cache duration (in seconds) */ private $cache_duration = 3600; /** * List of domains for which to force HTTPS. * @see \SimplePie\Sanitize::set_https_domains() * Array is a tree split at DNS levels. Example: * array('biz' => true, 'com' => array('example' => true), 'net' => array('example' => array('www' => true))) */ public $https_domains = []; public function __construct() { // Set defaults $this->set_url_replacements(null); } public function remove_div($enable = true) { $this->remove_div = (bool) $enable; } public function set_image_handler($page = false) { if ($page) { $this->image_handler = (string) $page; } else { $this->image_handler = false; } } public function set_registry(\SimplePie\Registry $registry)/* : void */ { $this->registry = $registry; } public function pass_cache_data($enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie\Cache', ?DataCache $cache = null) { if (isset($enable_cache)) { $this->enable_cache = (bool) $enable_cache; } if ($cache_location) { $this->cache_location = (string) $cache_location;2 changes between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
set_http_client() added.verified against sourceget_http_client() added.verified against sourcesrc/wp-includes/SimplePie/src/Sanitize.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.