Is there an easy way to replace entities like & #039; with ' within a string? I found one that unescapes URLs (for example %20-> space) but not one that unescapes HTML codes like > and the like.
Printable View
Is there an easy way to replace entities like & #039; with ' within a string? I found one that unescapes URLs (for example %20-> space) but not one that unescapes HTML codes like > and the like.
Have you looked into the ASP.Net classes for whether there's a utility that does what you want?
Aye...check System.Web.HttpUtility.HtmlDecode().
Yeah, I was looking for one, didn't see that. Thanks!
Edit: It says HttpUtility isn't in the System.Web namespace, in fact my System.Web namespace is all but empty.
Edit200,000: OK figured it out, needed to add a reference to my project. Works fine now, thanks!