mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 16:55:57 +00:00
sanitize: disable referrer via referrerpolicy for img elements
This commit is contained in:
@@ -1585,6 +1585,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($entry->nodeName == 'img') {
|
if ($entry->nodeName == 'img') {
|
||||||
|
$entry->setAttribute('referrerpolicy', 'no-referrer');
|
||||||
|
|
||||||
if ($entry->hasAttribute('src')) {
|
if ($entry->hasAttribute('src')) {
|
||||||
$is_https_url = parse_url($entry->getAttribute('src'), PHP_URL_SCHEME) === 'https';
|
$is_https_url = parse_url($entry->getAttribute('src'), PHP_URL_SCHEME) === 'https';
|
||||||
|
|||||||
Reference in New Issue
Block a user