diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-05-05 20:56:55 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-05-05 20:56:55 +0200 |
commit | 6a4c366975dde87175b356084f2c258e782134e0 (patch) | |
tree | 0d29a8e5ce5554d509ff92ae41a0a3017be0a942 /src/main/java/de/pixart/messenger/ui/adapter | |
parent | 0446624c51942118e74fbba93d40d83a9856723d (diff) |
encode and decode % and # in invite links
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/adapter')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index a14e1057b..f97ca0beb 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -102,11 +102,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie private static final int DATE_SEPARATOR = 3; - private static final Pattern XMPP_PATTERN = Pattern - .compile("xmpp\\:(?:(?:[" - + Patterns.GOOD_IRI_CHAR - + "\\;\\/\\?\\@\\&\\=\\#\\~\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])" - + "|(?:\\%[a-fA-F0-9]{2}))+"); boolean isResendable = false; private List<String> highlightedTerm = null; @@ -600,7 +595,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie if (highlightedTerm != null) { StylingHelper.highlight(activity, body, highlightedTerm, StylingHelper.isDarkText(viewHolder.messageBody)); } - Linkify.addLinks(body, XMPP_PATTERN, "xmpp", XMPPURI_MATCH_FILTER, null); + Linkify.addLinks(body, Patterns.XMPP_PATTERN, "xmpp", XMPPURI_MATCH_FILTER, null); Linkify.addLinks(body, Patterns.AUTOLINK_WEB_URL, "http", WEBURL_MATCH_FILTER, WEBURL_TRANSFORM_FILTER); Linkify.addLinks(body, GeoHelper.GEO_URI, "geo"); FixedURLSpan.fix(body); |