mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +02:00
Change rel
for external links to nofollow ugc
(#1884)
This commit is contained in:
committed by
Daniël Klabbers
parent
58299edc20
commit
3643e2010b
@@ -138,7 +138,7 @@ class Formatter
|
|||||||
|
|
||||||
foreach ($dom->getElementsByTagName('a') as $a) {
|
foreach ($dom->getElementsByTagName('a') as $a) {
|
||||||
$a->setAttribute('target', '_blank');
|
$a->setAttribute('target', '_blank');
|
||||||
$a->setAttribute('rel', 'nofollow');
|
$a->setAttribute('rel', 'nofollow ugc');
|
||||||
}
|
}
|
||||||
|
|
||||||
$dom->saveChanges();
|
$dom->saveChanges();
|
||||||
|
Reference in New Issue
Block a user