$form->field(name => 'sid', type => 'hidden', value => $session->id,
force => 1);
$form->field(name => 'page', type => 'hidden');
- $form->field(name => 'subject', type => 'text', size => 80);
+ $form->field(name => 'subject', type => 'text', size => 72);
$form->field(name => 'body', type => 'textarea', rows => 5,
cols => 80);
my ($authorurl, $author) = linkuser(getcgiuser($session));
- my $body = $form->field('body');
+ my $body = $form->field('body') || '';
$body =~ s/\r\n/\n/g;
$body =~ s/\r/\n/g;
$body .= "\n" if $body !~ /\n$/;
# - this means that if they do, rocks fall and everyone dies
if ($form->submitted eq PREVIEW) {
+ # $fake is a location that has the same number of slashes
+ # as the eventual location of this comment.
my $fake = "$page/_" . PLUGIN . "hypothetical";
my $preview = IkiWiki::htmlize($fake, $page, 'mdwn',
IkiWiki::linkify($page, $page,