From b5a45f062aaf643c1dab857658f9141cefcf7ed1 Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 9 Nov 2023 12:07:18 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E5=B8=AE=E5=8A=A9?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=86=85=EF=BC=8C=E9=93=BE=E6=8E=A5=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E5=B8=A6=E6=9C=89&=E7=9A=84=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E8=B7=B3=E8=BD=ACbug=20=20-=20[=E5=85=B3=E8=81=94]=20?= =?UTF-8?q?#[1020288030965760]=E5=9C=A8=E7=BA=BF=E5=B8=AE=E5=8A=A9?= =?UTF-8?q?=E6=96=87=E6=A1=A3-=E6=96=87=E6=A1=A3=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=9C=89=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=EF=BC=8C=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E5=B8=AE=E5=8A=A9=E7=AA=97=E5=8F=A3=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E6=96=87=E6=A1=A3=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=20http://192.168.0.96:8090/demo/rdm.html#/bu?= =?UTF-8?q?g-detail/939050947543040/939050947543057/1020288030965760?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/topnav/topnav-help.vue | 4 +++- .../pages/documentonline/document/documentonline-content.vue | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/components/topnav/topnav-help.vue b/src/views/components/topnav/topnav-help.vue index 05f17ee8..1f71d419 100644 --- a/src/views/components/topnav/topnav-help.vue +++ b/src/views/components/topnav/topnav-help.vue @@ -163,7 +163,9 @@ export default { }, openHelpManage() { if (this.isShowDetail) { - let url = HOME + '/documentonline.html#/documentonline-detail?filePath=' + this.filePath; + //替换文档标题的特殊字符& + let filePath = this.filePath.replace(/\&/g, '%26'); + let url = HOME + '/documentonline.html#/documentonline-detail?filePath=' + filePath; if (this.anchorPoint) { url += '&anchorPoint=' + this.anchorPoint; } diff --git a/src/views/pages/documentonline/document/documentonline-content.vue b/src/views/pages/documentonline/document/documentonline-content.vue index 9c5747df..8292ff47 100644 --- a/src/views/pages/documentonline/document/documentonline-content.vue +++ b/src/views/pages/documentonline/document/documentonline-content.vue @@ -81,6 +81,11 @@ export default { let id = 'heading_' + _this.$utils.setUuid(); return `${text}`; }; + //替换文档中a标签链接参数的特殊字符& + renderer.link = (href, title, text) => { + const newhref = href.replace(/\&/g, '%26'); + return `${text}`; + }; this.markdownContent = marked(this.markdownSource, { renderer }); this.getHeadings(); this.$nextTick(() => { -- Gitee