$ npm i xss_blade --save
import { xssFilter, getDefaultOptions } from "xss_blade";
html = xssFilter('<script>alert("xss");</script>');
console.log('默认参数:', getDefaultOptions());
options = {
whiteList:{
a:['href'],
img:['src']
}
}; // 自定义规则
options = {
whiteList:{}
}; // 覆盖封装函数内的whiteList配置
html = xssFilter('<script>alert("xssFilter");</script>', options);