在使用 Fieldset Nunjucks 宏时,如果选择了包含 'html' 参数的选项,为了防止跨站脚本(XSS)攻击,您必须对传入的 HTML 内容进行清理(sanitise)。
资料中明确指出:“If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.”
这意味着,当您在生产环境中,并且使用了任何带有 "html" 选项(或以 "html" 结尾的选项)的 Nunjucks 宏时,为了安全起见,必须执行 HTML 清理操作,以防御跨站脚本攻击。