From 6c6f84779aa5cdcc5ebadd49ebc929078116e284 Mon Sep 17 00:00:00 2001 From: PiEgg Date: Mon, 23 Aug 2021 23:21:58 +0800 Subject: [PATCH] :bug: Fix: urlEncode bug when copy ISSUES CLOSED: #731 --- src/universal/utils/pasteTemplate.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/universal/utils/pasteTemplate.ts b/src/universal/utils/pasteTemplate.ts index 0e270ba..fab8e93 100644 --- a/src/universal/utils/pasteTemplate.ts +++ b/src/universal/utils/pasteTemplate.ts @@ -1,9 +1,8 @@ import { IPasteStyle } from '#/types/enum' -import { handleUrlEncode } from './common' const formatCustomLink = (customLink: string, item: ImgInfo) => { let fileName = item.fileName!.replace(new RegExp(`\\${item.extname}$`), '') - const url = handleUrlEncode(item.url || item.imgUrl) + const url = item.url || item.imgUrl const formatObj = { url, fileName @@ -19,7 +18,7 @@ const formatCustomLink = (customLink: string, item: ImgInfo) => { } export default (style: IPasteStyle, item: ImgInfo, customLink: string | undefined) => { - const url = handleUrlEncode(item.url || item.imgUrl) + const url = item.url || item.imgUrl const _customLink = customLink || '$url' const tpl = { 'markdown': `![](${url})`,