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.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 833bedf25..6d0e45a97 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -406,19 +406,19 @@ sub sessioncgi ($$) {
if ($config{comments_allowauthor}) {
my $author = $form->field('author');
- if (length $author) {
+ if (defined $author && length $author) {
$author =~ s/"/"/g;
$content .= " claimedauthor=\"$author\"\n";
}
my $url = $form->field('url');
- if (length $url) {
+ if (defined $url && length $url) {
$url =~ s/"/"/g;
$content .= " url=\"$url\"\n";
}
}
my $subject = $form->field('subject');
- if (length $subject) {
+ if (defined $subject && length $subject) {
$subject =~ s/"/"/g;
$content .= " subject=\"$subject\"\n";
}