mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue #80 : validate custom search URL without placeholders, which will make URLs invalid in some cases
This commit is contained in:
parent
9974bd0ff4
commit
912bee4138
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue