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

Re: special characters in parsed json rendering badly in browser

by slugger415 (Monk)
on Sep 09, 2018 at 13:55 UTC ( #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
Node Status?
node history
Node Type: note [id://1221978]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2020-03-29 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (171 votes). Check out past polls.

    Notices?