2

I'm having problem converting html code to a string. Can someone explain how do I convert

Here’s What Happened Today: Wednesday 

to

Here's What Happened Today: Wednesday

I've tried using WebUtility.HtmlDecode, but it still returns the string with the &#8217

Note I'm trying to do this within a WP8 app.

Thanks.

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
Thierry
  • 6,142
  • 13
  • 66
  • 117

1 Answers1

1

I found this on SO.

WebUtility.HtmlDecode vs HttpUtilty.HtmlDecode

Seems to output different values based on the function called. I would use HttpUtility.HtmlDecode instead since it's matching your the behavior that you want.

Community
  • 1
  • 1
Chubosaurus Software
  • 8,133
  • 2
  • 20
  • 26
  • Bang on!! I didn't think http utility was available in wp8 but it is and it worked. Kind of poor from MS that the behaviour is different for the 2 as you would think that both would behave the same way. Wasted so much time on this, thinking I was doing something wrong! Thanks again! – Thierry Aug 06 '14 at 22:19
  • Yeah I read the comment on that page seems a lot of people wasted a lot of time figuring it out. – Chubosaurus Software Aug 06 '14 at 22:21