WebUtility.HtmlDecode vs HttpUtilty.HtmlDecode

后端 未结 3 1260
臣服心动
臣服心动 2020-12-05 05:05

I was using WebUtilty.HtmlDecode to decode HTML. It turns out that it doesn\'t decode properly, for example, is supposed to decode to a

3条回答
  •  温柔的废话
    2020-12-05 05:31

    Just to notify others who will find this in search. Use any function that mentioned in the question, but never use Windows.Data.Html.HtmlUtilities.ConvertToText(string input). It's 70 times slower than WebUtilty.HtmlDecode and produce crashes! Crash will be named as mshtml!IEPeekMessage in the DevCenter. It looks like this function call InternetExplorer to convert the string. Just avoid it.

提交回复
热议问题