“`”

(1) 将前端输出数据都进行转义
(2) 将输出的字符串中的\反斜杠进行转义
(3) 从url中获取的信息,防止方法是由后端获取,在前端转义后再行输出
(4) 使用cookie的HttpOnly属性,保护好cookie
详细参见:<a class=""url"" href=""http://blog.csdn.net/fengyinchao/article/details/52303118"" target=""_blank"">http://blog.csdn.net/fengyinchao/article/details/52303118</a>

<pre><code> "“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.