From 15cd539756549b8ed7fd3257d7b3d5a656b59ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=98=89=E8=B1=AA?= <42510293+ziyujiahao@users.noreply.github.com> Date: Wed, 17 Dec 2025 17:01:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E6=A0=87=E9=A2=98=E5=B8=A6=E6=9C=89?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=E6=97=B6=EF=BC=8C=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E7=9A=84=E6=8C=87=E6=A0=87=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=20#17482=20(#17634)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rich-text/DeRichTextView.vue | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue index cd94a4fae8..d3ace9d9ff 100644 --- a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue +++ b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue @@ -130,6 +130,7 @@ const language_map = { tw: 'zh_TW', 'zh-CN': 'zh_CN' } + const language = language_map[userStore.getLanguage] const dataRowSelect = ref({}) const dataRowNameSelect = ref({}) @@ -382,7 +383,7 @@ const assignment = content => { if (on) { const thresholdStyleInfo = conditionAdaptor(state.viewDataInfo) on.forEach(itm => { - if (dataRowFiledName.value.includes(itm)) { + if (dataRowFiledName.value.includes(decodeHTMLEntities(itm))) { const ele = itm.slice(1, -1) let value = dataRowNameSelect.value[ele] !== undefined ? dataRowNameSelect.value[ele] : null @@ -411,6 +412,22 @@ const assignment = content => { return content } + +const decodeHTMLEntities = text => { + if (!text) return text + + const textarea = document.createElement('textarea') + textarea.innerHTML = text + return textarea.value +} + +const encodeHTMLEntities = text => { + if (!text) return text + + const textarea = document.createElement('textarea') + textarea.textContent = text + return textarea.innerHTML +} const initFontFamily = htmlText => { const regex = /font-family:\s*([^;"]+);/g let match