Skip to content

Instantly share code, notes, and snippets.

@dayyan
Created May 15, 2012 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dayyan/2705175 to your computer and use it in GitHub Desktop.
Save dayyan/2705175 to your computer and use it in GitHub Desktop.
Pinterest urls in Javascript
/* Pinterest urls need to be URI encoded, then URI component encoded.
*/
replace('{shareUrl}', escape(shareObj.shareUrl)).replace('{imageUrl}', encodeURIComponent(encodeURI(shareObj.imageUrl))).replace('{shareText}', escape(shareObj.shareText));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment