- Home /
WWW.EscapeURL not working as described
On the Unity support website it says:
// This will print the string "Testing%201%2C2%2C3" to the console
print(WWW.EscapeURL("Testing 1,2,3"));
When I try this on a Mac build I get the result: Testing+1,2,3
This is a pain as I am using WWW.EscapeURL and mailto command and I'm getting an email full of "+"s instead of spaces. Not ideal. Anybody know how to fix this or an alternative to use?
Comment
Answer by Ludeme Games · Aug 05, 2012 at 09:36 AM
I'm not sure about the behavior of EscapeURL, but if you are encoding the body of an e-mail you should use HTMLEncode that comes with .Net. You can find more information about it here.
According to the support site EscapeURL is for "building web page parameters", such as a web address, not web page content.