Please help me to encode / decode HTML tag that i get from WWW …
can you put some sample code, that show how you get the tag?, when you say encode/decode, do you mean md5 for passwords?
if so, google->js md5
Hi man, not really sure what you mean - if you are using php to get it from the web simply using the php md5 build in function ->php.net->md5 you must know how it’s encoded so you can decode it using the right algorithm. Im guessing that … means a word like
mypassword=… or something, this is encoded using some kind of algorithm, that u know right?
It’s not a hash at all. It’s an encoded ellipsis. Check out System.Web.HttpUtility.HtmlDecode()
so is there any examples of this? I am using ASP.NET, and
I’ve tried adding a reference to System.Web but always failed. I do not know why, is it possible not support to add reference in unity?
The WWW class has encode and decode functions for any purpose.
@muisish: it works depending on the platform. While the compatibility list claims it works in webplayer, the last time it worked anywhere it was the standalone build only - for regular HTTP / HTTPS communication you would use WWW, for anything more advanced you would develop something on top of the TCP Socket (UniWeb on the asset store for example)
I have some problem. And WWW,UnEscapeUrl doesn’t work. I trying to unescape “mail@mail.com” and FAIL
the escape unescape are to transform stuff thats incorrect as part of an URL. for example space to %20. it will not convert html letter code to real signs as it does not support html, its for urls only (and mail adress are no urls, they are nothing to at max hyperlinks within html). use @ directly instead or explain what you try to do
I use Prime31 SocialNetworking Plugin. The server returns email in “mail@mail.com” format. And I need to decode this string. System.Web.HttpUtility is unavailable and I don’t know, how I can decode this string.
write it manually.
mailAdress = mailAdress.Replace(“”,“@”);
for example
that or request Prime31 to fix the plugin and provide correct unicode strings instead of that html munchie Cause ObjC can provide correct strings if asked to do.
Has a workaround for this been found? I need to convert diacritics and this seems like a significant oversight.
Anyone ever found a nice solution for this instead of doing it yourself?
Someone grabbed the Mono-HttpUtility to use it in Unity: RestSharp-for-unity3d/RestSharp/Extensions/MonoHttp at master · Cratesmith/RestSharp-for-unity3d · GitHub
Import all three classes into your project, and use the RestSharp.Contrib
namespace to call HttpUtility.HtmlDecode (yourHtmlTextToDecode);