summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2014-01-22 18:28:44 +0400
committerAndrew Dolgov <[email protected]>2014-01-22 18:28:44 +0400
commit5b319e8be2941483ac6b847f83c26c5da53d1d44 (patch)
treed94bc8ea73241480e79a53466a59d2e34bb4a46c /include
parentfd94d63122b8919ddf6b146ebe9ef01dde655acd (diff)
sanitize: reinstate rel=noreferrer on article links
Diffstat (limited to 'include')
-rw-r--r--include/functions.php5
1 files changed, 4 insertions, 1 deletions
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'));