Y'know, just kill *ALL* whitespace when doing length checks.
This commit is contained in:
parent
2d820491e6
commit
e47d3abfac
2
Block.pm
2
Block.pm
@ -291,7 +291,7 @@ sub validate_htmlarea {
|
|||||||
my $scrubber = HTML::Scrubber -> new();
|
my $scrubber = HTML::Scrubber -> new();
|
||||||
my $nohtml = $scrubber -> scrub($text);
|
my $nohtml = $scrubber -> scrub($text);
|
||||||
|
|
||||||
$nohtml =~ s/[\t\r\n]//g; # Kill some kinds of whitespace that may be left by scrubber that will confuse length checks.
|
$nohtml =~ s/\s//g; # Kill some kinds of whitespace that may be left by scrubber that will confuse length checks.
|
||||||
|
|
||||||
# If the text area is empty, deal with the whole default/required malarky
|
# If the text area is empty, deal with the whole default/required malarky
|
||||||
if(!defined($nohtml) || !$nohtml) {
|
if(!defined($nohtml) || !$nohtml) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user