How do i escape HTML characters in .NET?
I am grabbing html from a json string and in the title i get "more text. It looks like i need to do it twice to get " to become " then that to be a ‘”‘.
How do i escape all the text html escape codes in .NET?
If you have to do it twice, then you have double encoded your source string, and so you have to double decode it to get back to the original (unencoded) string.
You can use
System.Web.HttpUtility.HtmlEncode()andHtmlDecode()for these purposes.