diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2010-05-11 09:05:28 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2010-05-11 09:05:28 -0700 |
commit | 9fadc3a1966adaf27751a78ad5b3e5a653ca38c1 (patch) | |
tree | 40d6dbe609e7ffcd2147be82b8fe73b475024712 /src/com/android | |
parent | aa905e91eb3eadaa7b3de9ae1ac252225152af3c (diff) | |
parent | 73d3033e59bed3a7b35f2e56bded7f4809675d62 (diff) | |
download | packages_apps_Browser-9fadc3a1966adaf27751a78ad5b3e5a653ca38c1.zip packages_apps_Browser-9fadc3a1966adaf27751a78ad5b3e5a653ca38c1.tar.gz packages_apps_Browser-9fadc3a1966adaf27751a78ad5b3e5a653ca38c1.tar.bz2 |
Merge "Prevent browser becoming unresponsive when surfing to a URL with many %-escaped characters."
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index a754900..60dffac 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -3294,11 +3294,13 @@ public class BrowserActivity extends Activity } else if (url.startsWith("http://")) { url = url.substring(4); } + // Escape wildcards for LIKE operator. + url = url.replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_"); try { url = "%" + url; String [] selArgs = new String[] { url }; - String where = Browser.BookmarkColumns.URL + " LIKE ? AND " + String where = Browser.BookmarkColumns.URL + " LIKE ? ESCAPE '\\' AND " + Browser.BookmarkColumns.BOOKMARK + " = 0"; Cursor c = mResolver.query(Browser.BOOKMARKS_URI, Browser.HISTORY_PROJECTION, where, selArgs, null); |