diff --git a/plugins/op_waf/js/op_waf.js b/plugins/op_waf/js/op_waf.js
index 87a853560..170c7a871 100755
--- a/plugins/op_waf/js/op_waf.js
+++ b/plugins/op_waf/js/op_waf.js
@@ -1612,8 +1612,6 @@ function wafSite(){
});
}
-
-
function wafLogRequest(page){
var args = {};
args['page'] = page;
@@ -1640,9 +1638,9 @@ function wafLogRequest(page){
list += '
' + getLocalTime(data[i]['time'])+' | ';
list += '' + data[i]['domain'] +' | ';
list += '' + data[i]['ip'] +' | ';
- list += '' + data[i]['uri'] +' | ';
+ list += '' + data[i]['uri'] +' | ';// data[i]['uri']
list += '' + data[i]['rule_name'] +' | ';
- list += '' + data[i]['reason'] +' | ';
+ list += '' + entitiesEncode(data[i]['reason']) +' | ';//data[i]['reason']
list += '详情 | ';
list += '';
}
diff --git a/route/static/app/public.js b/route/static/app/public.js
index 23ca5ae39..18238915d 100755
--- a/route/static/app/public.js
+++ b/route/static/app/public.js
@@ -1620,6 +1620,34 @@ function toArrayObject(str){
return data;
}
+/**
+* 实体字符编码
+* @param {*} text 待编码的文本
+* @returns
+*/
+function entitiesEncode(text) {
+ text = text.replace(/&/g, "&");
+ text = text.replace(//g, ">");
+ text = text.replace(/ /g, " ");
+ text = text.replace(/"/g, """);
+ return text;
+}
+/**
+* 实体字符解码
+* @param {*} text 待解码的文本
+* @returns
+*/
+function entitiesDecode(text) {
+ text = text.replace(/&/g, "&");
+ text = text.replace(/</g, "<");
+ text = text.replace(/>/g, ">");
+ text = text.replace(/ /g, " ");
+ text = text.replace(/"/g, "'");
+ return text;
+}
+
+
function pluginService(_name, version){
var data = {name:_name, func:'status'}
if ( typeof(version) != 'undefined' ){