From 1acf1771889172907f635ee16f652c1a7bf40b58 Mon Sep 17 00:00:00 2001 From: Kobi Date: Thu, 17 Sep 2020 16:28:33 +0800 Subject: [PATCH] =?UTF-8?q?BI-73176=20fix:=20htmlEncode=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/alias.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/alias.js b/src/core/alias.js index d1e3231e5..da5af0fb6 100644 --- a/src/core/alias.js +++ b/src/core/alias.js @@ -416,10 +416,11 @@ "&": "&", "\"": """, "<": "<", - ">": ">" + ">": ">", + " ": " " }; 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] : " "; }); };