fis-optimizer-smarty-xss
Advanced tools
Comparing version 0.0.1 to 0.0.2
33
index.js
@@ -1,4 +0,18 @@ | ||
var DEFAULT_CONF = { | ||
'escapeMap' : { | ||
'js' : 'f_escape_js', | ||
/* | ||
* fis | ||
* http://fis.baidu.com/ | ||
*/ | ||
'use strict'; | ||
var xss = require('smarty-xss'); | ||
module.exports = function(content, file, conf){ | ||
xss.config(conf); | ||
return xss.repair(content); | ||
}; | ||
module.exports.defaultOptions = { | ||
'escapeMap' : { | ||
'js' : 'f_escape_js', | ||
'html' : 'f_escape_xml', | ||
@@ -9,12 +23,5 @@ 'data' : 'f_escape_data', | ||
'no_escape' : 'escape:none' | ||
}, | ||
'leftDelimiter' : '{%', | ||
'rightDelimiter' : '%}' | ||
}; | ||
module.exports = function(content, file, conf){ | ||
conf = fis.util.merge(DEFAULT_CONF, conf); | ||
var xss = require('smarty-xss'); | ||
xss.config(conf); | ||
return content; | ||
}, | ||
'leftDelimiter' : '{%', | ||
'rightDelimiter' : '%}' | ||
}; |
@@ -5,3 +5,3 @@ { | ||
"homepage": "http://fis.baidu.com/", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": { | ||
@@ -8,0 +8,0 @@ "name": "FIS Team", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2355
21