From 5b319e8be2941483ac6b847f83c26c5da53d1d44 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 22 Jan 2014 18:28:44 +0400 Subject: [PATCH] sanitize: reinstate rel=noreferrer on article links --- include/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index 28b7a7c89..7cdeae3b6 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2831,10 +2831,13 @@ if ($site_url) { - if ($entry->hasAttribute('href')) + if ($entry->hasAttribute('href')) { $entry->setAttribute('href', rewrite_relative_url($site_url, $entry->getAttribute('href'))); + $entry->setAttribute('rel', 'noreferrer'); + } + if ($entry->hasAttribute('src')) { $src = rewrite_relative_url($site_url, $entry->getAttribute('src'));