Fix spurious conversion of newlines to li in ul during tidying.

This commit is contained in:
Chris 2014-03-20 10:57:26 +00:00
parent c4dda13372
commit aa8b67acd8

View File

@ -404,6 +404,9 @@ sub validate_htmlarea {
return ("", , $self -> {"template"} -> replace_langvar("BLOCK_VALIDATE_TIDYFAIL", {"***field***" => $settings -> {"nicename"}}))
if(!$tidied);
# Tidy will stick in spurious list elements, remove them
$tidied =~ s|<li style="list-style: none"></li>\n||g;
# Now we can go ahead and check with the validator to see whether the tidied
# code is valid xhtml
my $valid = check_xhtml($tidied);