mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
also trim() when beatifying URLs and twitter handles
This commit is contained in:
parent
5df5d1d7b5
commit
b1f5ae5297
1 changed files with 5 additions and 5 deletions
|
@ -196,14 +196,14 @@ public class DisplayUtils {
|
|||
}
|
||||
|
||||
if (url.length() >= 7 && url.substring(0, 7).equalsIgnoreCase(HTTP_PROTOCOLL)) {
|
||||
return url.substring(HTTP_PROTOCOLL.length());
|
||||
return url.substring(HTTP_PROTOCOLL.length()).trim();
|
||||
}
|
||||
|
||||
if (url.length() >= 8 && url.substring(0, 8).equalsIgnoreCase(HTTPS_PROTOCOLL)) {
|
||||
return url.substring(HTTPS_PROTOCOLL.length());
|
||||
return url.substring(HTTPS_PROTOCOLL.length()).trim();
|
||||
}
|
||||
|
||||
return url;
|
||||
return url.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -218,9 +218,9 @@ public class DisplayUtils {
|
|||
}
|
||||
|
||||
if (handle.startsWith(TWITTER_HANDLE_PREFIX)) {
|
||||
return handle;
|
||||
return handle.trim();
|
||||
} else {
|
||||
return TWITTER_HANDLE_PREFIX + handle;
|
||||
return TWITTER_HANDLE_PREFIX + handle.trim();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue