Browse Source

sanitize: disable referrer via referrerpolicy for img elements

Andrew Dolgov 1 year ago
parent
commit
7651b6e2cd
1 changed files with 1 additions and 0 deletions
  1. 1 0
      include/functions.php

+ 1 - 0
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';