Browse Source

BI-73176 fix: htmlEncode编码空格

es6
Kobi 4 years ago
parent
commit
1acf177188
  1. 5
      src/core/alias.js

5
src/core/alias.js

@ -416,10 +416,11 @@
"&": "&", "&": "&",
"\"": """, "\"": """,
"<": "&lt;", "<": "&lt;",
">": "&gt;" ">": "&gt;",
" ": "&nbsp;"
}; };
BI.htmlEncode = function (text) { BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;"; return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
}); });
}; };

Loading…
Cancel
Save