我使用meta http-equiv =“Content-Security-Policy”标记将域列入白名单.这个列表变得非常大,所以我想知道在内容值中使用新行是否可以?
编辑:刚发现validator.w3.org显示多行内容值的错误,所以我想这是不允许的.
Bad value Content-Security-Policy for attribute http-equiv on element meta
也就是说,错误是针对http-equiv属性,而不是针对content属性.
但是请尝试将您的来源更改为:
……你会发现它没有报告错误.
所以,你看到的错误是因为:如果meta元素有一个http-equiv属性,那么according to the HTML spec the value of the http-equiv
must be one of the following:
>内容类型
>默认样式
>刷新
> X-UA兼容
所以HTML规范(尚未)允许http-equiv =“Content-Security-Policy”.
总而言之,这是W3C HTML检查器中的一个错误,因为检查器应该支持http-equiv =“Content-Security-Policy,遵循details provided about http-equiv="Content-Security-Policy
in the Content Security Policy spec.
刚才我raised a checker bug for it.
这基本上也是HTML规范中的一个错误,因为此时HTML规范本身也应该说允许使用http-equiv =“Content-Security-Policy”.所以I’ve raised a bug against the HTML spec for this将http-equiv =“Content-Security-Policy”添加到我上面引用的HTML规范的Pragma directives部分,并且这个补丁可能会在本周晚些时候合并到规范中.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。