使用AntiXss.HtmlEncode方法來防止跨站點腳本攻擊中文會被轉碼,
可使用Sanitizer.GetSafeHtmlFragment(string inpu)方法來進行解碼。
轉碼:
解碼:
需要以用兩個的dll:https://download.csdn.net/download/LookingTomorrow/12015056
參考:
https://stackoverflow.com/questions/3959136/antixss-htmlencode-vs-antixss-getsafehtmlfragment