wp-includes/SimplePie/src/Sanitize.php:574$htmlstring$typeSimplePie\int-mask-of<SimplePie::CONSTRUCT_*>string protected function preprocess(string $html, int $type) { $ret = ''; $html = preg_replace('%</?(?:html|body)[^>]*?'.'>%is', '', $html); if ($type & ~\SimplePie\SimplePie::CONSTRUCT_XHTML) { // Atom XHTML constructs are wrapped with a div by default // Note: No protection if $html contains a stray </div>! $html = '<div>' . $html . '</div>'; $ret .= '<!DOCTYPE html>'; $content_type = 'text/html'; } else { $ret .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; $content_type = 'application/xhtml+xml'; } $ret .= '<html><head>'; $ret .= '<meta http-equiv="Content-Type" content="' . $content_type . '; charset=utf-8" />'; $ret .= '</head><body>' . $html . '</body></html>'; return $ret; }3 changes between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
$html retyped from untyped to string.verified against source$type retyped from untyped to SimplePie\int-mask-of<SimplePie::CONSTRUCT_*>.verified against sourcenone to string.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.