Skip to content

Commit

Permalink
balanceTags() called for story creation. No more forgotten </I> tags!
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiemccarthy committed Jun 20, 2002
1 parent 53221b8 commit 805126a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/Admin/admin.pl
Expand Up @@ -1048,6 +1048,8 @@ sub editStory {
$storyref->{$field});
$storyref->{$field} = parseSlashizedLinks(
$storyref->{$field});
$storyref->{$field} = balanceTags(
$storyref->{$field});
}

$topic = $slashdb->getTopic($storyref->{tid});
Expand Down Expand Up @@ -1455,6 +1457,8 @@ sub updateStory {
}
$form->{introtext} = slashizeLinks($form->{introtext});
$form->{bodytext} = slashizeLinks($form->{bodytext});
$form->{introtext} = balanceTags($form->{introtext});
$form->{bodytext} = balanceTags($form->{bodytext});

my $data = {
uid => $form->{uid},
Expand Down Expand Up @@ -1533,6 +1537,8 @@ sub saveStory {
) . otherLinks($edituser->{nickname}, $form->{tid}, $edituser->{uid});
$form->{introtext} = slashizeLinks($form->{introtext});
$form->{bodytext} = slashizeLinks($form->{bodytext});
$form->{introtext} = balanceTags($form->{introtext});
$form->{bodytext} = balanceTags($form->{bodytext});

my $time = ($form->{fastforward})
? $slashdb->getTime()
Expand Down
2 changes: 2 additions & 0 deletions utils/createTestStories
Expand Up @@ -65,6 +65,7 @@ $constants = getCurrentStatic();
my $introtext = make_werds(20 + rand 40 + rand 50, 0.3);
$introtext .= typical_remark() if rand(1) < 0.05;
$introtext = slashizeLinks($introtext);
$introtext = balanceTags($introtext);
my $bodytext = '';
if (rand(1) < 0.1) {
$bodytext = make_werds(20 + (rand 30) * (rand 50), 0.1);
Expand All @@ -73,6 +74,7 @@ $constants = getCurrentStatic();
}xge;
}
$bodytext = slashizeLinks($bodytext);
$bodytext = balanceTags($bodytext);
my $dept = lc make_werds(2+rand 6);
$dept =~ s/<[^>]+>//g;
$dept =~ s/\s+/-/g;
Expand Down

0 comments on commit 805126a

Please sign in to comment.