diff --git a/src/core/platform/web/jquery/fn.js b/src/core/platform/web/jquery/fn.js index cb7a014769..5ecf47eed0 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; }