Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by tangent (Curate)
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 perusing the Monastery: (21)
As of 2015-07-31 16:43 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 (279 votes), past polls