From de1dee73802e1eed14c107c7ec6a110ae8f6a974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Tue, 10 Sep 2024 14:09:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E7=9B=AE=E8=BD=AC=E4=B9=89=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/classTask/classTask.vue | 8 +++----- .../src/views/classTask/container/item-dialog.vue | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue index bfacb90..a6fedee 100644 --- a/src/renderer/src/views/classTask/classTask.vue +++ b/src/renderer/src/views/classTask/classTask.vue @@ -173,12 +173,10 @@ const toolStore = useToolState() // 将标签中的双引号增加转义 const escapeHtmlQuotes = (str) => { // 后端已replace双引号, 故前端不用在处理 - return str + const regex1 = /\\+/g; // 匹配多个反斜杠 + let result = str.replace(regex1, '\\'); - // 只对双引号进行转义 - // return str.replace(/(<[^>]+>)/g, function (match) { - // return match.replace(/"/g, '\\"') - // }) + return result; } const pollingST = ref(null) //轮询定时器标识 diff --git a/src/renderer/src/views/classTask/container/item-dialog.vue b/src/renderer/src/views/classTask/container/item-dialog.vue index 1eba989..d18c6d3 100644 --- a/src/renderer/src/views/classTask/container/item-dialog.vue +++ b/src/renderer/src/views/classTask/container/item-dialog.vue @@ -521,12 +521,10 @@ const tableRadioChange = (e) => { // 将标签中的双引号增加转义 const escapeHtmlQuotes = (str) => { // 后端已replace双引号, 故前端不用在处理 - return str + const regex1 = /\\+/g; // 匹配多个反斜杠 + let result = str.replace(regex1, '\\'); - // 只对双引号进行转义 - // return str.replace(/(<[^>]+>)/g, function (match) { - // return match.replace(/"/g, '\\"') - // }) + return result; } //#region 作业概况