Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HttpUtility.HtmlDecode in WinRT

Is there an equivalent to HttpUtility.HtmlDecode in WinRT? I'm developing a MetroStyle app and want to decode strings that came from a XML doc.

like image 712
Alireza Noori Avatar asked Dec 01 '11 13:12

Alireza Noori


People also ask

What is Httputility HtmlDecode?

UrlDecode Method (System. Web) Converts a string that has been encoded for transmission in a URL into a decoded string. To encode or decode values outside of a web application, use the WebUtility class.

What is the use of Httputility HtmlEncode?

Converts an object's string representation into an HTML-encoded string, and returns the encoded string. Converts a string to an HTML-encoded string. Converts a string into an HTML-encoded string, and returns the output as a TextWriter stream of output.

Which method is used to decode the currently encoded HTML code?

The input string is encoded using the HtmlEncode method. The encoded string obtained is then decoded using the HtmlDecode method.


2 Answers

Use System.Net.WebUtility instead

like image 84
Darrin Eide Avatar answered Oct 24 '22 02:10

Darrin Eide


According to this answer from a Microsoft employee, there's currently no replacement for HtmlDecode in the WinRT that's included in the Windows 8 Developer Preview.

However, there will be a replacement in the next pre-release version of WinRT.

like image 39
Judah Gabriel Himango Avatar answered Oct 24 '22 01:10

Judah Gabriel Himango