Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: HTML::Scrubber stripping hrefs when I don't want it to

by tangent (Deacon)
on Mar 12, 2012 at 17:57 UTC ( #959153=note: print w/ replies, xml ) Need Help??


in reply to HTML::Scrubber stripping hrefs when I don't want it to

$scrubber->default(1) allows the tags ('a' etc.) but not the tag's attributes ('href' etc.). To allow the 'href' attribute you need to change it to:

# allow href $scrubber->default(1,{'href'=> 1}); # or allow all tag attributes $scrubber->default(1,{'*'=> 1});
and it's more like a doorman than a WMD :)


Comment on Re: HTML::Scrubber stripping hrefs when I don't want it to
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-07-12 23:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (242 votes), past polls