修正合并错误问题
This commit is contained in:
@@ -300,6 +300,7 @@ FilterXSS.prototype.process = function (html) {
|
||||
var tagStart = false;
|
||||
var quoteStart = false;
|
||||
var currentPos = 0;
|
||||
var len = 0;
|
||||
|
||||
// 逐个分析字符
|
||||
for (currentPos = 0, len = html.length; currentPos < len; currentPos++) {
|
||||
@@ -377,12 +378,12 @@ if (typeof window !== 'undefined') {
|
||||
}
|
||||
if(!Array.forEach){
|
||||
Array.prototype.forEach = function(fn){
|
||||
for(var i=0;i<this.length;i++) fn(this[i],i,this);
|
||||
for(var i=0;i<this.length;i++) fn(this[i],i,this);
|
||||
};
|
||||
}
|
||||
if(!String.trim){
|
||||
String.prototype.trim = function(){
|
||||
return this.replace(/(^\s*)|(\s*$)/g,"");
|
||||
return this.replace(/(^\s*)|(\s*$)/g,"");
|
||||
};
|
||||
}
|
||||
window.filterXSS = module.exports;
|
||||
|
||||
Reference in New Issue
Block a user