Subject: | 2 bugs |
Hello,
I reckon you already know about these but just in case...
1. Last word gets cut off from stripped text, when there is no HTML closing tag.
2. I can't seem to use the same stripper object several times. New stripped text is appended to previous stripped text.
The following illustrates what I'm saying:
#!/usr/bin/perl
use HTML::Stripper;
my $stripper = HTML::Stripper->new();
my $str1 = $stripper->strip_html( "I spent my vacation in Malibu." );
my $str2 = $stripper->strip_html( "Siberia is cold." );
print "$str1\n$str2\n";
The output is:
I spent my vacation in
I spent my vacation in Malibu.Siberia is