Whitespaces break length ghecks, damnit.

This commit is contained in:
Chris 2012-08-01 13:40:16 +01:00
parent 0d6d5ac11a
commit 2d820491e6

View File

@ -291,6 +291,8 @@ 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.
# 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) {
# If the parameter is required, return empty and an error # If the parameter is required, return empty and an error