fix escape

This commit is contained in:
YouWei Zhao 2020-05-18 20:10:49 +08:00
parent 01b4dc2e89
commit a0f51eee74

View File

@ -1015,7 +1015,7 @@ ActionParser.prototype.matchEvalCompare=function(args, isShadow){
for (var index = 0,op; op=oplist[index]; index++) {
var match=new RegExp('(?<= )'+(op=='||'?'\\|\\|':op)+'(?= )').exec(str)
if (!match) continue;
args=[this.expandEvalBlock([raw.slice(0,match.index)],isShadow),(op=='&&'?'&amp;&amp;':op),this.expandEvalBlock([raw.slice(match.index+op.length)],isShadow)]
args=[this.expandEvalBlock([raw.slice(0,match.index)],isShadow),op.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'),this.expandEvalBlock([raw.slice(match.index+op.length)],isShadow)]
return {ret:true,xml:xml,args:args}
}
return {ret:false}