iapyang 6 years ago
parent
commit
2a60a458ae
  1. 3
      src/core/platform/web/jquery/fn.js

3
src/core/platform/web/jquery/fn.js vendored

@ -95,6 +95,7 @@ if (jQuery) {
}
if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").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($("<span>").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;
}

Loading…
Cancel
Save