url - How to double encodeURIComponent in javascript? -


in web app, use mailto link open outlook 2007. insert url body. problem need whole url hyperlink. if there spaces, hyperlink breaks, or if there special characters if ends close parenthesizes character wont included in hyperlink, link breaks.

what tried using encodeuricomponent on link, url encodes it, issue in outlook, automatically decode normal breaks link. need way double encode it.

basically instead of doing

" " -> "%20" (<-- encodeuricomponent)

i need

" " -> "%2520"

so in outlook, %25 gets decoded %, when combines 20 %20 keeping link encoded once , not broken. work me, don't know how function.

does know how can double encode?

thanks

encode

var encoded=escape(encodeuricomponent(' ')); 

decode

 var decoded=decodeuricomponent(unescape(encoded)); 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -