($commentauthorurl, $commentauthor) =
linkuser($params{username});
}
- elsif (defined $params{ip}) {
- $commentip = $params{ip};
- $commentauthor = sprintf(
- gettext("Anonymous (IP: %s)"), $params{ip});
- }
else {
+ if (defined $params{ip}) {
+ $commentip = $params{ip};
+ }
$commentauthor = gettext("Anonymous");
}
my $type = $form->param('type');
if (defined $type && length $type && $IkiWiki::hooks{htmlize}{$type}) {
- $type = possibly_foolish_untaint($type);
+ $type = IkiWiki::possibly_foolish_untaint($type);
}
else {
$type = $config{default_pageext};
}
my $subject = $form->field('subject');
- $subject =~ s/"/"/g;
- $content .= " subject=\"$subject\"\n";
+ if (length $subject) {
+ $subject =~ s/"/"/g;
+ $content .= " subject=\"$subject\"\n";
+ }
$content .= " date=\"" . IkiWiki::formattime(time, '%X %x') . "\"\n";