From e3123626d1168a316bbb0c73ed375ba9d21e562f Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Tue, 26 Dec 2023 09:53:38 +0800 Subject: [PATCH] fix double encodeURL --- lib/plugins/tag/post_link.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/plugins/tag/post_link.ts b/lib/plugins/tag/post_link.ts index f24449bead..5d12fc7cc0 100644 --- a/lib/plugins/tag/post_link.ts +++ b/lib/plugins/tag/post_link.ts @@ -41,8 +41,7 @@ export = (ctx: Hexo) => { const attrTitle = escapeHTML(post.title || post.slug); if (escape === 'true') title = escapeHTML(title); - const url = url_for.call(ctx, post.path) + (hash ? `#${hash}` : ''); - const link = encodeURL(url); + const link = url_for.call(ctx, post.path + (hash ? `#${hash}` : '')); return `${title}`; };