1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:15:55 +00:00

sanitize: disable referrer via referrerpolicy for img elements

This commit is contained in:
Andrew Dolgov
2017-12-13 20:07:10 +03:00
parent 6184f5264e
commit 7651b6e2cd

View File

@@ -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';