Skip to content

Commit

Permalink
fix double encodeURL
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Dec 26, 2023
1 parent 857a2ba commit e312362
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/plugins/tag/post_link.ts
Expand Up @@ -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 `<a href="${link}" title="${attrTitle}">${title}</a>`;
};
Expand Down

0 comments on commit e312362

Please sign in to comment.