From 55e9067b27d2d4c669a7144f19e55ad9e1a252a7 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 9 Feb 2017 20:14:36 +0100 Subject: [PATCH] do not auto link non-http URLs --- .../eu/siacs/conversations/ui/adapter/MessageAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 3dbd9f3f9..1364f0d27 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -92,8 +92,8 @@ public class MessageAdapter extends ArrayAdapter implements CopyTextVie }; private static final Linkify.MatchFilter WEBURL_MATCH_FILTER = new Linkify.MatchFilter() { @Override - public boolean acceptMatch(CharSequence charSequence, int start, int end) { - return start < 1 || charSequence.charAt(start-1) != '@'; + public boolean acceptMatch(CharSequence cs, int start, int end) { + return start < 1 || (cs.charAt(start-1) != '@' && !cs.subSequence(Math.max(0,start - 3),start).equals("://")); } };