[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...
This commit is contained in:
Romain Derie
2018-03-09 10:42:27 +01:00
parent fcb48b7241
commit cc97fa292a
@@ -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,
};