fix cssFilter, allow pass css=false to disable cssFilter

This commit is contained in:
Zongmin Lei
2016-11-06 11:06:02 +08:00
parent ebd1259f15
commit 857fa9de67
5 changed files with 42 additions and 6 deletions

View File

@@ -296,6 +296,14 @@ myxss = new xss.FilterXSS({
html = myxss.process('<script>alert("xss");</script>');
```
如果不想使用 CSS 过滤器来处理 `style` 属性的内容,可指定 `css` 选项的值为 `false`
```javascript
myxss = new xss.FilterXSS({
css: false,
});
```
要获取更多的帮助信息可看这里https://github.com/leizongmin/js-css-filter
### 快捷配置