Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 cooling their heels in the Monastery: (6)
As of 2014-12-28 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (181 votes), past polls