Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 OWASP ESAPI 来防止 XSS 攻击。我ESAPI.encoder().encodeForHTML((String)request.getAttribute("value")) 根据他们的建议使用,但是该值显示为转义,就像输入标签的值test (11)一样。test (11)我也尝试过使用 JSTL 标签,但结果相同。浏览器是否有任何方式将值视为只是数据而不是脚本,以便可以以原始形式显示值。
ESAPI.encoder().encodeForHTML((String)request.getAttribute("value"))
test (11)
test (11)