]> git.wh0rd.org Git - tt-rss.git/commitdiff
sanitize: reinstate rel=noreferrer on article links
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 22 Jan 2014 14:28:44 +0000 (18:28 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 22 Jan 2014 14:28:44 +0000 (18:28 +0400)
include/functions.php

index 28b7a7c89b44b8d212dd2aeebedc5f8734b95217..7cdeae3b64f0724f3c3834291c1a74bcef5df5b2 100644 (file)
 
                        if ($site_url) {
 
-                               if ($entry->hasAttribute('href'))
+                               if ($entry->hasAttribute('href')) {
                                        $entry->setAttribute('href',
                                                rewrite_relative_url($site_url, $entry->getAttribute('href')));
 
+                                       $entry->setAttribute('rel', 'noreferrer');
+                               }
+
                                if ($entry->hasAttribute('src')) {
                                        $src = rewrite_relative_url($site_url, $entry->getAttribute('src'));