From a81aecc3a68b501d6fdad69d1930fdba417adad7 Mon Sep 17 00:00:00 2001 From: ozhozh Date: Fri, 27 May 2011 17:28:09 +0000 Subject: [PATCH] Better encoding of text to be shared on Twitter. Fixes issue 758. git-svn-id: http://yourls.googlecode.com/svn/trunk@628 12232710-3e20-11de-b438-597f59cd7555 --- js/share.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/share.js b/js/share.js index d3009e5..245c040 100644 --- a/js/share.js +++ b/js/share.js @@ -13,8 +13,8 @@ $(document).ready(function(){ }) function update_share() { - var text = encodeURI( $('#tweet_body').val() ); - var url = encodeURI( $('#copylink').val() ); + var text = encodeURIComponent( $('#tweet_body').val() ); + var url = encodeURIComponent( $('#copylink').val() ); var tw = 'http://twitter.com/intent/tweet?status='+text; var ff = 'http://friendfeed.com/share/bookmarklet/frame#title='+text ; var fb = 'http://www.facebook.com/share.php?u='+url ; -- 2.45.0