I need to convert HTML char eq. “
to UNICODE char. I've tried to use function HtmlUtilities.ConvertToText(string)
but unfortunately this function removes whatever exists between <
and >
. I need a sort of function that works as good as WebView Control
, ie HTML markups should be parsed or even removed while the others could be shown in a textblock. It should be used as converter for the textblock.
For example: nicks should be shown from the website bash.org
You're probably looking for WebUtility.HtmlDecode()
. That should decode the values from the HTML entity ( “
) to a character.
Note that it's WebUtility
since I think you're trying to accomplish this on a desktop application. If not, use HttpUtility
instead.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.