From cc97fa292a455e0b7043df958d5b7e901d128515 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 8 Mar 2018 16:44:30 +0100 Subject: [PATCH] [FIX] website: prevent URL from being encoded twice Before this commit, the twitter share (intents) would encode the URL twice. The URL on the tweet would then be broken. Eg: https%3A%2F%http://2Fwww.odoo.com%2Fforum... --- addons/website/static/src/js/content/snippets.animation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/js/content/snippets.animation.js b/addons/website/static/src/js/content/snippets.animation.js index f4f49271b87..d9dc076f596 100644 --- a/addons/website/static/src/js/content/snippets.animation.js +++ b/addons/website/static/src/js/content/snippets.animation.js @@ -856,7 +856,7 @@ registry.socialShare = Animation.extend({ var hashtags = ' #'+ document.title.split(" | ")[1].replace(' ','') + ' ' + this.hashtags; // company name without spaces (for hashtag) var social_network = { 'facebook': 'https://www.facebook.com/sharer/sharer.php?u=' + url, - 'twitter': 'https://twitter.com/intent/tweet?original_referer=' + url + '&text=' + encodeURIComponent(title + hashtags + ' - ' + url), + 'twitter': 'https://twitter.com/intent/tweet?original_referer=' + url + '&text=' + encodeURIComponent(title + hashtags + ' - ') + url, 'linkedin': 'https://www.linkedin.com/shareArticle?mini=true&url=' + url + '&title=' + encodeURIComponent(title), 'google-plus': 'https://plus.google.com/share?url=' + url, };