From fbf145ca3ff18985d0885ed939ee63123add9dbd Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 11 Dec 2008 02:03:07 +0000 Subject: comments: avoid warning if there's no subject --- IkiWiki/Plugin/comments.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin/comments.pm') 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/"/"/g; - $content .= " subject=\"$subject\"\n"; + if (length $subject) { + $subject =~ s/"/"/g; + $content .= " subject=\"$subject\"\n"; + } $content .= " date=\"" . IkiWiki::formattime(time, '%X %x') . "\"\n"; -- cgit v1.2.3