diff options
author | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-12-11 02:03:07 +0000 |
---|---|---|
committer | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-12-11 21:14:05 +0000 |
commit | fbf145ca3ff18985d0885ed939ee63123add9dbd (patch) | |
tree | d4252fa73041ce1f44533790552d099654a076ce /IkiWiki/Plugin | |
parent | a5889912b386eaa43774907c3844c90e3e3ca7c8 (diff) |
comments: avoid warning if there's no subject
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 6 |
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/"/"/g; - $content .= " subject=\"$subject\"\n"; + if (length $subject) { + $subject =~ s/"/"/g; + $content .= " subject=\"$subject\"\n"; + } $content .= " date=\"" . IkiWiki::formattime(time, '%X %x') . "\"\n"; |