Browse Source

In web searches, only replace %s for the search string because the formatter will try to parse url encodes strings such as %3B as well. Fixes issue #134.

pull/148/merge
Eric Kok 11 years ago
parent
commit
af400ac5a8
  1. 3
      core/src/org/transdroid/core/gui/search/SearchActivity.java

3
core/src/org/transdroid/core/gui/search/SearchActivity.java

@ -265,8 +265,7 @@ public class SearchActivity extends SherlockFragmentActivity implements OnNaviga
// Start a browser page directly to the requested search results // Start a browser page directly to the requested search results
WebsearchSetting websearch = (WebsearchSetting) lastUsedSite; WebsearchSetting websearch = (WebsearchSetting) lastUsedSite;
startActivity(new Intent(Intent.ACTION_VIEW, startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(websearch.getBaseUrl().replace("%s", lastUsedQuery))));
Uri.parse(String.format(websearch.getBaseUrl(), lastUsedQuery))));
finish(); finish();
} else if (lastUsedSite instanceof SearchSite) { } else if (lastUsedSite instanceof SearchSite) {

Loading…
Cancel
Save