From 1b5a20078105a914c799f058a0303a04a409e989 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Thu, 26 Sep 2019 23:02:25 +0200 Subject: [PATCH] Amend the existing rel attribute of links ...instead of overwriting. This will play more nicely with extensions. Refs #859. --- src/Formatter/Formatter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Formatter/Formatter.php b/src/Formatter/Formatter.php index 3a5878268..d726a1dda 100644 --- a/src/Formatter/Formatter.php +++ b/src/Formatter/Formatter.php @@ -139,7 +139,8 @@ class Formatter $dom = $configurator->tags['URL']->template->asDOM(); foreach ($dom->getElementsByTagName('a') as $a) { - $a->setAttribute('rel', 'nofollow ugc'); + $rel = $a->getAttribute('rel'); + $a->setAttribute('rel', "$rel nofollow ugc"); } $dom->saveChanges();