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

Re: How to convert <,&,>,",' into XML &lt;,&amp;,&gt;,&quot ..

by ikegami (Patriarch)
on Dec 16, 2008 at 20:20 UTC ( #730728=note: print w/replies, xml ) Need Help??


in reply to How to convert <,&,>,",' into XML &lt;,&amp;,&gt;,&quot ..

encode_entities($input, q{<>&"'}) from HTML::Entities will do the trick.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2023-06-06 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (29 votes). Check out past polls.

    Notices?