summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-12-11 02:03:07 +0000
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-12-11 21:14:05 +0000
commitfbf145ca3ff18985d0885ed939ee63123add9dbd (patch)
treed4252fa73041ce1f44533790552d099654a076ce
parenta5889912b386eaa43774907c3844c90e3e3ca7c8 (diff)
comments: avoid warning if there's no subject
-rw-r--r--IkiWiki/Plugin/comments.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 6bd18a5cf..d1105b366 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -434,8 +434,10 @@ sub sessioncgi ($$) { #{{{
}
my $subject = $form->field('subject');
- $subject =~ s/"/&quot;/g;
- $content .= " subject=\"$subject\"\n";
+ if (length $subject) {
+ $subject =~ s/"/&quot;/g;
+ $content .= " subject=\"$subject\"\n";
+ }
$content .= " date=\"" . IkiWiki::formattime(time, '%X %x') . "\"\n";