antisamy parser force closing tag

送分小仙女□ 提交于 2019-12-05 06:19:39

Try this -

<tag name="iframe" action="validate"/>

And add a tag to this list -

<allowed-empty-tags>
   <literal-list>
      <literal value="iframe"/>
   </literal-list>
</allowed-empty-tags>

See http://code.google.com/p/owaspantisamy/...

I ran into the same issue. In my case it was due to the AntiSamy policy having this directive:

<directive name="useXHTML" value="true" /> 

Which, per the OWASP documentation, will output the sanitized data in XHTML format as opposed to just regular HTML. Please see: https://www.owasp.org/index.php/AntiSamy_Directives

Changing that value to false will allow the sanitized output to be provided as valid HTML. Block level elements will not be shortened and become invalid markup.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!