How to add a special characters in text overlays?

Follow

Comments

4 comments

  • Avatar
    Salil Sethi

    when I double escape the following string and send it over

     

    "The arrangement covers the movie studio 20th Century Fox, the company’s TV production arm 20th Century Fox Television, Fox-owned cable networks (including FX and National Geographic), and the company’s stakes in international networks like Star TV and Sky (which Fox is planning to acquire full ownership of before" 

    I'm receiving the following image with encoding characters

    0
    Comment actions Permalink
  • Avatar
    Roee Ben Ari

    Hi Salil,

    In order to get a valid URL, please use encodeURIComponent instead of escape, like this:

    overlayText = encodeURIComponent(encodeURIComponent(text));

    You can read more about the difference between the two methods here:

    http://xkr.us/articles/javascript/encode-compare/

     

    0
    Comment actions Permalink
  • Avatar
    Lowell Chayadi

    hello, how about % character, I tried double-escape for that, but the node js library state that it's failing to decode URI malformed

    0
    Comment actions Permalink
  • Avatar
    Raya Straus

    Hi Lowell,

    Can you please share with us your implementation? 

    0
    Comment actions Permalink

Please sign in to leave a comment.