summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2015-07-12 11:46:44 -0400
committerLukas Fleischer <lfleischer@archlinux.org>2015-07-12 20:37:42 +0200
commit881b550dec07fbfbebea2229a6667bcc37eef0f2 (patch)
tree3b53bb6603d3207e2a56929249b00416f33e0972
parentf4f1921fc60a759c647fb6004655c4dd9e8639cd (diff)
downloadaurweb-881b550dec07fbfbebea2229a6667bcc37eef0f2.tar.xz
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>
-rw-r--r--web/lib/aur.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index 7a455c6..b410db5 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -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