Don't remove +'s from an fdroid.search intent.

As per CR comment. These don't really ressemble URIs very much, so I
don't think they will require sanitization like this at all.
This commit is contained in:
Peter Serwylo 2015-12-12 10:02:45 +11:00
parent 86fb652fc3
commit 49ffe06576
2 changed files with 2 additions and 6 deletions

View File

@ -212,7 +212,7 @@ public class FDroid extends AppCompatActivity implements SearchView.OnQueryTextL
appId = data.getSchemeSpecificPart();
} else if ("fdroid.search".equals(scheme)) {
// fdroid.search:query
query = UriCompat.replacePlusWithSpace(data.getSchemeSpecificPart());
query = data.getSchemeSpecificPart();
}
if (!TextUtils.isEmpty(query)) {

View File

@ -13,13 +13,9 @@ public class UriCompat {
public static String getQueryParameter(Uri uri, String key) {
String value = uri.getQueryParameter(key);
if (value != null && Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
value = replacePlusWithSpace(value);
value = value.replaceAll("\\+", " ");
}
return value;
}
public static String replacePlusWithSpace(String input) {
return input.replaceAll("\\+", " ");
}
}