From 2a60a458ae482e45becd05b4439d375707d5a093 Mon Sep 17 00:00:00 2001 From: iapyang Date: Tue, 8 Jan 2019 14:10:30 +0800 Subject: [PATCH] update --- src/core/platform/web/jquery/fn.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/platform/web/jquery/fn.js b/src/core/platform/web/jquery/fn.js index cb7a01476..5ecf47eed 100644 --- a/src/core/platform/web/jquery/fn.js +++ b/src/core/platform/web/jquery/fn.js @@ -95,6 +95,7 @@ if (jQuery) { } if (tidx >= 0) { + // 标红的text未encode this.append(BI.htmlEncode(textLeft.substr(0, tidx))); this.append($("").addClass("bi-keyword-red-mark") .html(BI.htmlEncode(textLeft.substr(tidx, keyword.length)))); @@ -104,6 +105,7 @@ if (jQuery) { py = py.substr(tidx + keyword.length); } } else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) { + // 标红的text未encode this.append(BI.htmlEncode(textLeft.substr(0, pidx))); this.append($("").addClass("bi-keyword-red-mark") .html(BI.htmlEncode(textLeft.substr(pidx, keyword.length)))); @@ -112,6 +114,7 @@ if (jQuery) { } textLeft = textLeft.substr(pidx + keyword.length); } else { + // 标红的text未encode this.append(BI.htmlEncode(textLeft)); break; }