From df9298aac3ffa91fa4019dee4a50bb1925c4cd45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Wed, 20 Mar 2024 10:28:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=A8=E7=AB=99=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E6=94=BB=E5=87=BB=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/public/ueditor/ADT/background/background.js | 10 +++++++--- jero-web/src/mixins/ConfigurableTableMixin.js | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/jero-web/public/ueditor/ADT/background/background.js b/jero-web/public/ueditor/ADT/background/background.js index e8b65cd..61dd328 100644 --- a/jero-web/public/ueditor/ADT/background/background.js +++ b/jero-web/public/ueditor/ADT/background/background.js @@ -144,9 +144,13 @@ } if(url && /^\//.test(url)) { - var a = document.createElement('a'); - a.href = htmlspecialchars(url); - a.ref= 'nofollow noopener noreferrer' + var a = document.createElement('a'); + const index = url.indexOf('?') + const searchLeft = url.slice(0, index) + const searchRight = url.slice(index + 1, url.length) + url = searchLeft + htmlspecialchars(searchRight) + a.href = url; + a.rel= 'nofollow noopener noreferrer' browser.ie && (a.href = a.href); url = browser.ie ? a.href:(a.protocol + '//' + a.host + a.pathname + a.search + a.hash); } diff --git a/jero-web/src/mixins/ConfigurableTableMixin.js b/jero-web/src/mixins/ConfigurableTableMixin.js index 6c87487..6d87788 100644 --- a/jero-web/src/mixins/ConfigurableTableMixin.js +++ b/jero-web/src/mixins/ConfigurableTableMixin.js @@ -288,7 +288,11 @@ export const ConfigurableTableMixin = { // this.$message.success(`${info.file.name} 文件上传成功`); if (info.file.response.code === 201) { const { message, result: { msg, fileUrl, fileName } } = info.file.response - const href = this.htmlspecialchars(window._CONFIG.domianURL + fileUrl) + let href = window._CONFIG.domianURL + fileUrl + const index = href.indexOf('?') + const searchLeft = href.slice(0, index) + const searchRight = href.slice(index + 1, href.length) + href = searchLeft + this.htmlspecialchars(searchRight) this.$warning({ title: message, content: (