aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2011-04-29 23:04:04 +0200
committerTeddy Wing2011-04-29 23:04:04 +0200
commited8c24d59c8f036904608b94d01241f7ca5985f3 (patch)
tree60c91f961797a62cafb588a945c364bed82ecf44
parent428ec7bf99b510f9588015edf26fdce1f8065585 (diff)
downloadRocheTwit-ed8c24d59c8f036904608b94d01241f7ca5985f3.tar.bz2
Replace hashes in the request URL with their URL-encoded counterparts ('%23') to fix hashtag search bug
-rw-r--r--Resources/search.js2
1 files changed, 1 insertions, 1 deletions
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;