aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2017-01-09 11:37:10 +0000
committerSimon McVittie <smcv@debian.org>2017-01-09 13:07:24 +0000
commit9e7f0a6c59ec89c32af64d1577e314dd68b8e7f6 (patch)
treef1d142e35f637069c2ac70d1a41c7f519753b2cb /IkiWiki
parent62c9df67212c7c42eb03ad9e36891afe4bc2d9a2 (diff)
downloadikiwiki-9e7f0a6c59ec89c32af64d1577e314dd68b8e7f6.tar
ikiwiki-9e7f0a6c59ec89c32af64d1577e314dd68b8e7f6.tar.gz
Use rel=nofollow microformat for dynamic (CGI-related) URLs
Some of these might be relatively expensive to dereference or result in messages being logged, and there's no reason why a search engine should need to index them. (In particular, we'd probably prefer search engines to index the rendered page, not its source code.)
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/comments.pm6
-rw-r--r--IkiWiki/Plugin/passwordauth.pm2
2 files changed, 4 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 0858f69f1..46e1b268f 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -126,7 +126,7 @@ sub htmlize {
sub htmlize_pending {
my %params = @_;
return sprintf(gettext("this comment needs %s"),
- '<a href="'.
+ '<a rel="nofollow" href="'.
IkiWiki::cgiurl(do => "commentmoderation").'">'.
gettext("moderation").'</a>');
}
@@ -286,7 +286,7 @@ sub preprocess_moderation {
unless defined $params{desc};
if (length $config{cgiurl}) {
- return '<a href="'.
+ return '<a rel="nofollow" href="'.
IkiWiki::cgiurl(do => 'commentmoderation').
'">'.$params{desc}.'</a>';
}
@@ -946,7 +946,7 @@ sub pagetemplate (@) {
);
}
elsif (commentsopen($page)) {
- $link = "<a href=\"".addcommenturl($page)."\">".
+ $link = "<a rel=\"nofollow\" href=\"".addcommenturl($page)."\">".
#translators: Here "Comment" is a verb;
#translators: the user clicks on it to
#translators: post a comment.
diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm
index c966087ce..fb3fd9ee1 100644
--- a/IkiWiki/Plugin/passwordauth.pm
+++ b/IkiWiki/Plugin/passwordauth.pm
@@ -305,7 +305,7 @@ sub formbuilder_setup (@) {
noimageinline => 1));
}
else {
- $form->text("<a href=\"".
+ $form->text("<a rel=\"nofollow\" href=\"".
IkiWiki::cgiurl(do => "edit", page => $userpage).
"\">".gettext("Create your user page")."</a>");
}