Subject: | Adds false </br> tags |
This example code:
use warnings;
use strict;
use utf8;
my $snippet = q{
<P STYLE="font-size: 300%"><BLINK>"You may get to touch her<BR>
If your gloves are sterilized<BR></BR>
Rinse your mouth with Listerine</BR>
Blow disinfectant in her eyes"</BLINK><BR>
-- X-Ray Spex, <I>Germ-Free Adolescents<I>
<SCRIPT>alert('!!');</SCRIPT>
};
use HTML::Scrubber;
my $scrub = HTML::Scrubber->new (allow => [ qw[ p b i u hr br ] ] );
print $scrub->scrub ($snippet);
adds false </br> tags to the HTML output:
<p>"You may get to touch her<br>
If your gloves are sterilized<br></br>
Rinse your mouth with Listerine</br>
Blow disinfectant in her eyes"<br>
-- X-Ray Spex, <i>Germ-Free Adolescents<i>
There is no </br> tag in HTML.
Incidentally HTML::Restrict has an almost identical bug:
https://github.com/oalders/html-restrict/issues/24