Browse Source

update

master
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) { if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx))); this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").addClass("bi-keyword-red-mark") this.append($("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(tidx, keyword.length)))); .html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));
@ -104,6 +105,7 @@ if (jQuery) {
py = py.substr(tidx + keyword.length); 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)) { } 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(BI.htmlEncode(textLeft.substr(0, pidx)));
this.append($("<span>").addClass("bi-keyword-red-mark") this.append($("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(pidx, keyword.length)))); .html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));
@ -112,6 +114,7 @@ if (jQuery) {
} }
textLeft = textLeft.substr(pidx + keyword.length); textLeft = textLeft.substr(pidx + keyword.length);
} else { } else {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft)); this.append(BI.htmlEncode(textLeft));
break; break;
} }

Loading…
Cancel
Save