SecureHandlebars 上下文预编译器

程序名称:SecureHandlebars

授权协议: BSD

操作系统: 跨平台

开发语言: JavaScript

SecureHandlebars 介绍

SecureHandlebars 自动应用上下文相关的 XSS 输出过滤,以防止 XSS。

示例代码:

<!-- Disable the original handlebars -->
<!--script src="dist/handlebars.min.js"></script-->
<script src="dist/secure-handlebars.min.js"></script>
<script>
// given data stores a handlebars template as string
var html = '<html><title>{{title}}</title></html>',    
    data = {title: 'Hello'};
// analyze the HTML contexts, and return a handlebars template with context-sensitive helpers added
var template = Handlebars.compile(html);
// html is '<html><title>Hello</title></html>'
var html = template(data);
// inserts the html to the DOM// ...
</script>

SecureHandlebars 官网

https://github.com/yahoo/secure-handlebars

相关编程语言

IPTraf是一个使用简单的网络状况监视工具。
所谓 rootkit ,是一类入侵者经常使用的工具。这类工...
系统管理员可以利用Health Monitor 去监控网络中的每...
当服务器遭到黑客攻击时,在多数情况下,黑客可能对...
Hobbit是一个基于WEB用于监视系统运行状态和网络信息...
MX4J是Java管理扩展技术的一个开源实现,支持JSR3 (...