Bug fix - Topic search broken due to encodeURIComponent being called too early.

v1.18.x
Joseph Chen 10 years ago
parent 70b5c631c6
commit f02fd88eaf

@ -7,17 +7,18 @@ define('search', ['navigator'], function(nav) {
};
Search.query = function(term, callback) {
try {
term = encodeURIComponent(term);
} catch(e) {
return app.alertError('[[error:invalid-search-term]]');
}
// Detect if a tid was specified
var topicSearch = term.match(/in:topic-([\d]+)/);
if (!topicSearch) {
term = term.replace(/^[ ?#]*/, '');
try {
term = encodeURIComponent(term);
} catch(e) {
return app.alertError('[[error:invalid-search-term]]');
}
ajaxify.go('search/' + term);
callback();
} else {

Loading…
Cancel
Save