Converting & to & etc

前端 未结 6 648
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-28 11:54

I want to convert & to &, " to \" etc. Is there a function in c# that could do that without writing all the options manually?<

6条回答
  •  感动是毒
    2020-12-28 11:59

    System.Web.HttpUtility.HtmlDecode()
    

    Edit: Note from here that "To encode or decode values outside of a web application, use..."

    System.Net.WebUtility.HtmlDecode()
    

提交回复
热议问题