Issue #80 : validate custom search URL without placeholders, which will make URLs invalid in some cases

This commit is contained in:
Sean Owen 2014-03-05 22:11:29 +00:00
parent 9974bd0ff4
commit 912bee4138

View file

@ -107,6 +107,9 @@ public final class PreferencesFragment
if (valueString.isEmpty()) {
return true;
}
// Before validating, remove custom placeholders, which will not
// be considered valid parts of the URL in some locations:
valueString = valueString.replaceAll("%[sdf]", "");
// Require a scheme otherwise:
try {
URI uri = new URI(valueString);