使用AntiXss.HtmlEncode方法來防止跨站點腳本攻擊,後解碼

使用AntiXss.HtmlEncode方法來防止跨站點腳本攻擊中文會被轉碼,

可使用Sanitizer.GetSafeHtmlFragment(string inpu)方法來進行解碼。

轉碼:

解碼:

需要以用兩個的dll:https://download.csdn.net/download/LookingTomorrow/12015056

參考:

https://stackoverflow.com/questions/3959136/antixss-htmlencode-vs-antixss-getsafehtmlfragment

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章