remove white spaces from hostname

This commit is contained in:
Daniel Gultsch 2016-06-22 12:23:11 +02:00
parent 982a20fef5
commit 4d5e0c291e

View file

@ -153,8 +153,8 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
String hostname = null;
int numericPort = 5222;
if (mShowOptions) {
hostname = mHostname.getText().toString();
final String port = mPort.getText().toString();
hostname = mHostname.getText().toString().replaceAll("\\s","");
final String port = mPort.getText().toString().replaceAll("\\s","");
if (hostname.contains(" ")) {
mHostname.setError(getString(R.string.not_valid_hostname));
mHostname.requestFocus();