From ed8c24d59c8f036904608b94d01241f7ca5985f3 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 29 Apr 2011 23:04:04 +0200 Subject: Replace hashes in the request URL with their URL-encoded counterparts ('%23') to fix hashtag search bug --- Resources/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/search.js b/Resources/search.js index 1afe7f2..de65eeb 100644 --- a/Resources/search.js +++ b/Resources/search.js @@ -22,7 +22,7 @@ var row_data = []; // an array to store our result rows in var TSearch = { s: function(query) { var request = Titanium.Network.createHTTPClient(); - request.open('GET', 'http://search.twitter.com/search.json?q=' + query); + request.open('GET', 'http://search.twitter.com/search.json?q=' + query.replace('#', '%23')); // Appcelerator URL-encodes automatically, but doesn't always encode hashes ('#'). Twitter wants hashes to be URL-encoded, so we'll make sure they are. request.onload = function() { var results = (eval('(' + this.responseText + ')')).results; -- cgit v1.2.3