From 4c1c8d8b0eacecbbaa2d522bbdd6430f350ff760 Mon Sep 17 00:00:00 2001 From: Zak Kemble Date: Thu, 3 Mar 2022 12:55:27 +0000 Subject: [PATCH] fix: correctly URL encode share links Relates to #496 --- _includes/post-sharing.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_includes/post-sharing.html b/_includes/post-sharing.html index d6c80d702e2..69714aee8ea 100644 --- a/_includes/post-sharing.html +++ b/_includes/post-sharing.html @@ -6,10 +6,11 @@ {{ site.data.locales[lang].post.share }} {% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %} - {% assign url = page.url | absolute_url %} + {% assign title = title | url_encode %} + {% assign url = page.url | absolute_url | url_encode %} {% for share in site.data.share.platforms %} - {% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url | escape %} + {% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}