1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Removed ability to add slashes/url type parameters onto the server.

This commit is contained in:
Matthew Brace 2009-01-21 05:33:27 +00:00
parent 1cda221fa3
commit 357418a396

View File

@ -85,7 +85,7 @@ public class Utility {
public static boolean domainFieldValid(EditText view) { public static boolean domainFieldValid(EditText view) {
if (view.getText() != null) { if (view.getText() != null) {
String s = view.getText().toString(); String s = view.getText().toString();
if (s.matches("^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}(\\/([a-zA-Z0-9\\-~])+)?$")) { if (s.matches("^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$")) {
return true; return true;
} }
if (s.matches("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$")) { if (s.matches("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$")) {