Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set breakHtml length to 50, add in stripByMode for submissions

  • Loading branch information...
commit 459d54fcb51fbfe22ebf5bd69921b7bec70a2c73 1 parent 92774d7
@pudge pudge authored
View
3  Slash.pm
@@ -1231,6 +1231,7 @@ sub stripByMode {
# $str =~ s/'/'/g; # ' should be OK if we use
# " consistently
+ # probably 'html'
} else {
$str = stripBadHtml($str);
$str = breakHtml($str) unless $no_white_fix;
@@ -1258,7 +1259,7 @@ sub stripBadHtml {
my($comment, $mwl) = @_;
my($new, $l, $c, $in_tag, $this_tag, $cwl);
- $mwl = $mwl || 65;
+ $mwl = $mwl || 50;
$l = length($comment);
%is_break_tag = map { uc, 1 } qw(HR BR LI P OL UL BLOCKQUOTE DIV)
View
5 plugins/Submit/submit.pl
@@ -527,7 +527,8 @@ sub displayForm {
EOT
- print qq!<P>$user writes <I>"$I{F}{story}"</I></P>!;
+ my $story = stripByMode($I{F}{story}, 'html');
+ print qq!<P>$user writes <I>"$story"</I></P>!;
}
print formLabel("The Scoop",
@@ -578,7 +579,7 @@ sub saveSub {
email => $I{F}{email},
uid => $I{U}{uid},
name => $I{F}{from},
- story => $I{F}{story},
+ story => stripByMode($I{F}{story}, 'html'),
-'time' => 'now()',
subid => $subid,
subj => $I{F}{subj},
View
5 public_html/submit.pl
@@ -527,7 +527,8 @@ sub displayForm {
EOT
- print qq!<P>$user writes <I>"$I{F}{story}"</I></P>!;
+ my $story = stripByMode($I{F}{story}, 'html');
+ print qq!<P>$user writes <I>"$story"</I></P>!;
}
print formLabel("The Scoop",
@@ -578,7 +579,7 @@ sub saveSub {
email => $I{F}{email},
uid => $I{U}{uid},
name => $I{F}{from},
- story => $I{F}{story},
+ story => stripByMode($I{F}{story}, 'html'),
-'time' => 'now()',
subid => $subid,
subj => $I{F}{subj},
View
5 themes/slashcode/htdocs/submit.pl
@@ -527,7 +527,8 @@ sub displayForm {
EOT
- print qq!<P>$user writes <I>"$I{F}{story}"</I></P>!;
+ my $story = stripByMode($I{F}{story}, 'html');
+ print qq!<P>$user writes <I>"$story"</I></P>!;
}
print formLabel("The Scoop",
@@ -578,7 +579,7 @@ sub saveSub {
email => $I{F}{email},
uid => $I{U}{uid},
name => $I{F}{from},
- story => $I{F}{story},
+ story => stripByMode($I{F}{story}, 'html'),
-'time' => 'now()',
subid => $subid,
subj => $I{F}{subj},
Please sign in to comment.
Something went wrong with that request. Please try again.