1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 21:50:50 +02:00

Amend the existing rel attribute of links

...instead of overwriting. This will play more nicely with extensions.

Refs #859.
This commit is contained in:
Franz Liedke
2019-09-26 23:02:25 +02:00
parent 1bdf7764a9
commit 1b5a200781

View File

@@ -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();