From 7651b6e2cd982f54c8a2d940ccf7582b53e08831 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 13 Dec 2017 20:07:10 +0300 Subject: [PATCH] sanitize: disable referrer via referrerpolicy for img elements --- include/functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/functions.php b/include/functions.php index e1e63c2a3..60aebe0da 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1585,6 +1585,7 @@ } 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';