README 增加allowCommentTag选项的说明
This commit is contained in:
21
README.md
21
README.md
@@ -291,6 +291,27 @@ would output filtered:
|
||||
code:
|
||||
```
|
||||
|
||||
#### Filter out HTML comments
|
||||
|
||||
By using `allowCommentTag` parameter:
|
||||
|
||||
+ `true`: do nothing
|
||||
+ `false` by default: filter out HTML comments
|
||||
|
||||
Example:
|
||||
|
||||
If `allowCommentTag = false` is set, the following code:
|
||||
|
||||
```HTML
|
||||
code:<!-- something --> END
|
||||
```
|
||||
|
||||
would output filtered:
|
||||
|
||||
```HTML
|
||||
code: END
|
||||
```
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
21
README.zh.md
21
README.zh.md
@@ -282,6 +282,27 @@ code:<script>alert(/xss/);</script>
|
||||
code:
|
||||
```
|
||||
|
||||
#### 去掉HTML备注
|
||||
|
||||
通过 `allowCommentTag` 来设置:
|
||||
|
||||
+ `true`:不处理
|
||||
+ `false`:(默认),自动去掉HTML中的备注
|
||||
|
||||
示例:
|
||||
|
||||
当设置 `allowCommentTag = false` 时,以下代码
|
||||
|
||||
```HTML
|
||||
code:<!-- something --> END
|
||||
```
|
||||
|
||||
过滤后将输出
|
||||
|
||||
```HTML
|
||||
code: END
|
||||
```
|
||||
|
||||
|
||||
## 应用实例
|
||||
|
||||
|
||||
Reference in New Issue
Block a user