Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

HTML::TagFilter not filtering opening quote ?

by gube (Parson)
on Aug 18, 2010 at 17:11 UTC ( #855858=perlquestion: print w/ replies, xml ) Need Help??
gube has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I would like to strip the open quote tag from my html input. If any quote without closing quote i need to strip that out. But, its not stripping. Please suggest how to avoid the unwanted quotes ?
use strict; use warnings; use Time::Piece; use HTML::TagFilter; my $tf = HTML::TagFilter->new(); my $dirty_html = "test252bb<a>gube<"; my $clean_html = $tf->filter($dirty_html); print $clean_html; Current output : test252bb<a>gube&lt; I need : test252bb gube&lt;

Comment on HTML::TagFilter not filtering opening quote ?
Download Code
Re: HTML::TagFilter not filtering opening quote ?
by MidLifeXis (Monsignor) on Aug 18, 2010 at 17:52 UTC

    Update: OP changed top level node: Please show what you are getting from the print statement, and also what you would expect to get.

    --MidLifeXis

Re: HTML::TagFilter not filtering opening quote ?
by Your Mother (Chancellor) on Aug 18, 2010 at 18:10 UTC

    This change will strip the <a> but it won't replace it with a space-

    my $tf = HTML::TagFilter->new(allow => {});

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://855858]
Approved by murugu
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2015-07-02 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (40 votes), past polls