]> git.wh0rd.org Git - tt-rss.git/commitdiff
sanitize: disable referrer via referrerpolicy for img elements
authorAndrew Dolgov <noreply@fakecake.org>
Wed, 13 Dec 2017 17:07:10 +0000 (20:07 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Wed, 13 Dec 2017 17:07:10 +0000 (20:07 +0300)
include/functions.php

index e1e63c2a36f097584fbaf95b8c876a069b7ea36e..60aebe0da7b1cb98c41d571b9bdbd08b4a3e1666 100644 (file)
                        }
 
                        if ($entry->nodeName == 'img') {
+                               $entry->setAttribute('referrerpolicy', 'no-referrer');
 
                                if ($entry->hasAttribute('src')) {
                                        $is_https_url = parse_url($entry->getAttribute('src'), PHP_URL_SCHEME) === 'https';