fix(README): issue #137 xss.js URL
This commit is contained in:
@@ -97,7 +97,7 @@ console.log(html);
|
||||
Shim mode (reference file `test/test.html`):
|
||||
|
||||
```html
|
||||
<script src="https://raw.github.com/leizongmin/js-xss/master/dist/xss.js"></script>
|
||||
<script src="https://rawgit.com/leizongmin/js-xss/master/dist/xss.js"></script>
|
||||
<script>
|
||||
// apply function filterXSS in the same way
|
||||
var html = filterXSS('<script>alert("xss");</scr' + 'ipt>');
|
||||
@@ -112,7 +112,7 @@ AMD mode - shim:
|
||||
require.config({
|
||||
baseUrl: './',
|
||||
paths: {
|
||||
xss: 'https://raw.github.com/leizongmin/js-xss/master/dist/xss.js'
|
||||
xss: 'https://rawgit.com/leizongmin/js-xss/master/dist/xss.js'
|
||||
},
|
||||
shim: {
|
||||
xss: {exports: 'filterXSS'}
|
||||
@@ -125,6 +125,8 @@ require(['xss'], function (xss) {
|
||||
</script>
|
||||
```
|
||||
|
||||
**Notes: please don't use the URL https://rawgit.com/leizongmin/js-xss/master/dist/xss.js in production environment.**
|
||||
|
||||
## Command Line Tool
|
||||
|
||||
### Process File
|
||||
|
||||
@@ -90,7 +90,7 @@ console.log(html);
|
||||
Shim 模式(参考文件 `test/test.html`):
|
||||
|
||||
```html
|
||||
<script src="https://raw.github.com/leizongmin/js-xss/master/dist/xss.js"></script>
|
||||
<script src="https://rawgit.com/leizongmin/js-xss/master/dist/xss.js"></script>
|
||||
<script>
|
||||
// 使用函数名 filterXSS,用法一样
|
||||
var html = filterXSS('<script>alert("xss");</scr' + 'ipt>');
|
||||
@@ -105,7 +105,7 @@ AMD 模式(参考文件 `test/test_amd.html`):
|
||||
require.config({
|
||||
baseUrl: './',
|
||||
paths: {
|
||||
xss: 'https://raw.github.com/leizongmin/js-xss/master/dist/xss.js'
|
||||
xss: 'https://rawgit.com/leizongmin/js-xss/master/dist/xss.js'
|
||||
},
|
||||
shim: {
|
||||
xss: {exports: 'filterXSS'}
|
||||
@@ -118,6 +118,8 @@ require(['xss'], function (xss) {
|
||||
</script>
|
||||
```
|
||||
|
||||
**说明:请勿将 URL https://rawgit.com/leizongmin/js-xss/master/dist/xss.js 用于生产环境。**
|
||||
|
||||
### 使用命令行工具来对文件进行 XSS 处理
|
||||
|
||||
### 处理文件
|
||||
|
||||
Reference in New Issue
Block a user