can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r18764: LJSUP-8460: Doesn't work tumblr-sharing

Committer: dpetrov
LJSUP-8460: Doesn't work tumblr-sharing
U   trunk/htdocs/js/share.js
Modified: trunk/htdocs/js/share.js
===================================================================
--- trunk/htdocs/js/share.js	2011-04-01 06:38:31 UTC (rev 18763)
+++ trunk/htdocs/js/share.js	2011-04-01 07:00:15 UTC (rev 18764)
@@ -45,9 +45,10 @@
 
 	var options = jQuery.extend( {}, defaults, opts );
 
-	options.url = encodeURIComponent( options.url );
-	options.title = encodeURIComponent( options.title );
-	options.description = encodeURIComponent( options.description );
+	//we encode strings two times, because they are decoded once on the livejournal endpoint
+	options.url = encodeURIComponent( encodeURIComponent( options.url ) );
+	options.title = encodeURIComponent( encodeURIComponent( options.title ) );
+	options.description = encodeURIComponent( encodeURIComponent( options.description ) );
 	return options;
 }
 

Tags: can3p, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments