From 131c2b379cb84376117c62badc52363bac028142 Mon Sep 17 00:00:00 2001 From: Zongmin Lei Date: Wed, 19 Feb 2014 15:40:34 +0800 Subject: [PATCH] update README --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 245d6ec..e7b58fa 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,16 @@ options = {}; // 自定义规则 html = xss('', options); ``` -具体用法详见下文。 +如果不想每次都传入一个 `options` 参数,可以创建一个 `FilterXSS` 对象: + +``` +options = {}; // 自定义规则 +myxss = new xss.FilterXSS(options); +// 以后直接调用 myxss.process() 来处理即可 +html = myxss.process(''); +``` + +`options` 参数的详细说明见下文。 ### 白名单