From 10bc756932d9e962266d4f103d99b10a7431822b Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Tue, 15 Aug 2017 14:41:34 -0400 Subject: [PATCH 1/3] URL Encode Title and Page URL in Social Share Links The links to the various social networks include data from the post (title and url) which can contain URL special characters. Pass each of the generated URLs through Liquid's `url_encode` filter to build HTML complaint URLs. --- _includes/social-share.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_includes/social-share.html b/_includes/social-share.html index dbf769ef..71bc306a 100644 --- a/_includes/social-share.html +++ b/_includes/social-share.html @@ -3,11 +3,11 @@

{{ site.data.ui-text[site.locale].share_on_label | default: "Share on" }}

{% endif %} - Twitter + Twitter - Facebook + Facebook - Google+ + Google+ - LinkedIn + LinkedIn From 247bcde42efd218e5c8abe2bc0a66520170715c6 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Fri, 18 Aug 2017 12:20:01 -0400 Subject: [PATCH 2/3] URL Encode Title and Page URL in Social Share Links --- docs/_includes/social-share.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_includes/social-share.html b/docs/_includes/social-share.html index dbf769ef..71bc306a 100644 --- a/docs/_includes/social-share.html +++ b/docs/_includes/social-share.html @@ -3,11 +3,11 @@ {% endif %} - + - + - Google+ + Google+ - LinkedIn + LinkedIn From 3a632a62e8d4466e08ca9717c277fe180d83d898 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Fri, 18 Aug 2017 12:22:31 -0400 Subject: [PATCH 3/3] Update CHANGELOG and history --- CHANGELOG.md | 1 + docs/_docs/18-history.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e24445b..ffe04ccc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Increase font-size of code blocks. - Reduce indent of nested "table of contents" links. - Extend [archive grid view](https://mmistakes.github.io/minimal-mistakes/docs/layouts/) to the right to better fill the page. +- URL encode title and page URL in social share links. [#1177](https://github.com/mmistakes/minimal-mistakes/pull/1177) ## Bug Fixes diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md index 528b5c3c..125ff95f 100644 --- a/docs/_docs/18-history.md +++ b/docs/_docs/18-history.md @@ -4,7 +4,7 @@ permalink: /docs/history/ excerpt: "Change log of enhancements and bug fixes made to the theme." sidebar: nav: docs -last_modified_at: 2017-08-10T14:46:00-04:00 +last_modified_at: 2017-08-18T12:20:59-04:00 --- ## Unreleased @@ -17,6 +17,7 @@ last_modified_at: 2017-08-10T14:46:00-04:00 - Increase font-size of code blocks. - Reduce indent of nested "table of contents" links. - Extend [archive grid view](https://mmistakes.github.io/minimal-mistakes/docs/layouts/) to the right to better fill the page. +- URL encode title and page URL in social share links. [#1177](https://github.com/mmistakes/minimal-mistakes/pull/1177) ## Bug Fixes