Permalink
Browse files

fixing special chars

  • Loading branch information...
1 parent 69f8262 commit f2213fe2225c040b7daab4f11c01d410aad27112 @Networc committed Apr 19, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 javascript/keyshanc.js
View
@@ -135,6 +135,8 @@ function encryptKeyshanc() {
function generateTweet(tweetText) {
tweetText = encodeURIComponent(tweetText);
+ tweetText = tweetText.replace(/`/g, "%60");
+ tweetText = tweetText.replace(/\'/g, "%27");
$('#dynamicTweet').html("\
<iframe allowtransparency='true' frameborder='0' scrolling='no' src='http://platform.twitter.com/widgets/tweet_button.html?text=" + tweetText + "%20decrypt%20at%20http%3A%2F%2Fandrewcreed.com%2F2012%2F04%2F16%2Fkeyshanc-ported-to-javascript.html%20encrypt%20at&hashtags=keyshanc&count=none' style='width:115px; height:21px;'></iframe>\
<br />");

0 comments on commit f2213fe

Please sign in to comment.