use rel="nofollow" for links in comments

This removes the incentive for spammers to post links by asking search
engines to ignore them.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Daniel Micay 2015-07-12 11:46:44 -04:00 committed by Lukas Fleischer
parent f4f1921fc6
commit 881b550dec

View file

@ -595,7 +595,7 @@ function parse_comment($comment) {
if ($i % 2) {
# convert links
$html .= '<a href="' . htmlspecialchars($matches[$i]) .
'">' . htmlspecialchars($matches[$i]) . '</a>';
'" rel="nofollow">' . htmlspecialchars($matches[$i]) . '</a>';
}
else {
# convert everything else