in reply to Stripping of HTML content
i suppose I should suggest this:
use HTML::TagFilter; my $tf = new HTML::TagFilter; ... $tf->allow_tags({}); my $text = $tf->filter($html);
which does exactly the same as the other parser-based solutions, but by way of a subclass that hides much of the unpleasantness. It mght be worth a look if you think you'll want to strip html selectively later on, but otherwise i'd stick with one of the more direct methods described above.
|
|---|