diff --git a/Block.pm b/Block.pm index c64067d..9e1a05a 100644 --- a/Block.pm +++ b/Block.pm @@ -291,6 +291,8 @@ sub validate_htmlarea { my $scrubber = HTML::Scrubber -> new(); 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. + # If the text area is empty, deal with the whole default/required malarky if(!defined($nohtml) || !$nohtml) { # If the parameter is required, return empty and an error