使用AntiXss.HtmlEncode方法来防止跨站点脚本攻击中文会被转码,
可使用Sanitizer.GetSafeHtmlFragment(string inpu)方法来进行解码。
转码:
解码:
需要以用两个的dll:https://download.csdn.net/download/LookingTomorrow/12015056
参考:
https://stackoverflow.com/questions/3959136/antixss-htmlencode-vs-antixss-getsafehtmlfragment