Permalink
Browse files

use encodeURIComponent to encode the text and image parameters. Fixes #…

  • Loading branch information...
1 parent 880fba2 commit 239de49b0d4558695539b78ad2db1c4bbdf1a29a @aranasaurus aranasaurus committed Mar 3, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 meme.js
View
@@ -103,7 +103,7 @@ var sendMeme = function(channel, img, message, t1, t2) {
}
}
- var url = config.api_url+'/g?u=' + encodeURI(img) + '&t1=' + encodeURI(t1) + '&t2=' + encodeURI(t2);
+ var url = config.api_url+'/g?u=' + encodeURIComponent(img) + '&t1=' + encodeURIComponent(t1) + '&t2=' + encodeURIComponent(t2);
console.log('sending request t1='+t1+' t2='+t2+' img='+img);
console.log(url);
request(url, function(error, response, body){

0 comments on commit 239de49

Please sign in to comment.