summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/comments.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/comments.pm')
-rw-r--r--IkiWiki/Plugin/comments.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 41c6948e8..d34951570 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -177,7 +177,7 @@ sub preprocess {
if (defined $oiduser) {
# looks like an OpenID
$commentauthorurl = $commentuser;
- $commentauthor = $oiduser;
+ $commentauthor = (defined $params{nickname} && length $params{nickname}) ? $params{nickname} : $oiduser;
$commentopenid = $commentuser;
}
else {
@@ -396,12 +396,16 @@ sub editcomment ($$) {
my $content = "[[!comment format=$type\n";
- # FIXME: handling of double quotes probably wrong?
if (defined $session->param('name')) {
my $username = $session->param('name');
$username =~ s/"/"/g;
$content .= " username=\"$username\"\n";
}
+ if (defined $session->param('nickname')) {
+ my $nickname = $session->param('nickname');
+ $nickname =~ s/"/"/g;
+ $content .= " nickname=\"$nickname\"\n";
+ }
elsif (defined $session->remote_addr()) {
my $ip = $session->remote_addr();
if ($ip =~ m/^([.0-9]+)$/) {