Google Caja: Sample html4 def file?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 09:19:04

问题


I'm trying to implement this Introduction Tutorial to sanitize HTML using Caja's JSHtmlSanitizer.

I'm getting a reference is not defined error at line 1056 in html-sanitizer.js because the variable html4 is undefined. I believe this is a definition file. Where can I can get a sample of this definition file? I think I found a very old def file that dates back in 2008 and it's no longer in the latest version of the repo.


回答1:


The HTML defs file is built from the schema JSON by Caja's build system. The minimum build operation is:

$ ant pluginc

which will leave the built file at ant-lib/com/google/caja/plugin/html4-defs.js.



来源:https://stackoverflow.com/questions/22491521/google-caja-sample-html4-def-file

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