mirror of
https://github.com/flarum/framework.git
synced 2025-05-15 10:42:31 +08: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:
parent
4f06133d75
commit
431ab9f3e8
@ -137,7 +137,8 @@ class Formatter
|
|||||||
$dom = $configurator->tags['URL']->template->asDOM();
|
$dom = $configurator->tags['URL']->template->asDOM();
|
||||||
|
|
||||||
foreach ($dom->getElementsByTagName('a') as $a) {
|
foreach ($dom->getElementsByTagName('a') as $a) {
|
||||||
$a->setAttribute('rel', 'nofollow ugc');
|
$rel = $a->getAttribute('rel');
|
||||||
|
$a->setAttribute('rel', "$rel nofollow ugc");
|
||||||
}
|
}
|
||||||
|
|
||||||
$dom->saveChanges();
|
$dom->saveChanges();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user