格式化 · 第 10 题,共 12 题
哪些 format ViewHelper 在使用不当时可能导致 XSS?
有 2 个正确答案。 中等
显示答案
答案
- A f:format.htmlentitiesDecode
- C f:format.raw
解析
raw 取消转义,htmlentitiesDecode 会把已转义的字符还原为 HTML。相比之下,htmlspecialchars 和 stripTags 让输出更安全。
格式化 · 第 10 题,共 12 题
有 2 个正确答案。 中等
raw 取消转义,htmlentitiesDecode 会把已转义的字符还原为 HTML。相比之下,htmlspecialchars 和 stripTags 让输出更安全。