diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-02-09 20:04:49 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-02-09 20:04:49 +0100 |
commit | 835100d5f4ee36815e8b967cb97e54a4b355165a (patch) | |
tree | d566da2e1d460814a9012840edbd74e5a7608560 /src/main/java/de/pixart/messenger/entities | |
parent | a10d57e618713940c4a750d1f858a693569c0f0e (diff) |
small fixes for web preview
make links clickable and don't use transform links toLowerCase()
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Message.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java index 178a8e425..c8850c278 100644 --- a/src/main/java/de/pixart/messenger/entities/Message.java +++ b/src/main/java/de/pixart/messenger/entities/Message.java @@ -786,9 +786,9 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable } public synchronized boolean isWebUri() { - String url = body.toLowerCase().trim(); + String url = body.trim(); if (isWebUri == null) { - isWebUri = URLUtil.isValidUrl(url) && Patterns.WEB_URL.matcher(url).matches(); + isWebUri = URLUtil.isValidUrl(url) && Patterns.WEB_URL.matcher(url).matches() && !url.contains(" "); } return isWebUri; } |