Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: special characters in parsed json rendering badly in browser

by slugger415 (Monk)
on Sep 09, 2018 at 13:55 UTC ( [id://1221978]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use HTML::Entities;
    my($text) = "Kren’s 89th birthday";
    print encode_entities($text), $/;
    
  2. or download this
    Kren’s 89th birthday
    
  3. or download this
    $event{'desc'} =~ s/’/\&\#39\;/g;
    $event{'desc'} =~ s/–/-/g;
    ...
    $event{'desc'} =~ s/'/'/g;
    $event{'desc'} =~ s/“/"/g;
    $event{'desc'} =~ s/”/"/g;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-20 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found