1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-20 08:51:28 +00:00

Revert "Update HTML Purifier to version 4.4.0."

This reverts commit dd205fbad6.
This commit is contained in:
Andrew Dolgov
2012-06-05 21:52:37 +04:00
parent 010efc9b81
commit cb73535c8e
61 changed files with 362 additions and 1031 deletions

View File

@@ -24,13 +24,9 @@ class HTMLPurifier_AttrTransform_Nofollow extends HTMLPurifier_AttrTransform
$url = $this->parser->parse($attr['href']);
$scheme = $url->getSchemeObj($config, $context);
if ($scheme->browsable && !$url->isLocal($config, $context)) {
if (!is_null($url->host) && $scheme !== false && $scheme->browsable) {
if (isset($attr['rel'])) {
$rels = explode(' ', $attr);
if (!in_array('nofollow', $rels)) {
$rels[] = 'nofollow';
}
$attr['rel'] = implode(' ', $rels);
$attr['rel'] .= ' nofollow';
} else {
$attr['rel'] = 'nofollow';
}