From 9869310699377b9d87c504736542c4f8e11e1765 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 4 Dec 2017 16:50:15 +0100 Subject: [PATCH] avoid some false positive quotes --- src/main/java/eu/siacs/conversations/utils/UIHelper.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index b24b8099c..d255fd3bf 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -9,7 +9,6 @@ import android.widget.PopupMenu; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.math.BigInteger; -import java.nio.ByteBuffer; import java.security.MessageDigest; import java.util.Arrays; import java.util.Calendar; @@ -313,16 +312,16 @@ public class UIHelper { final char first = body.charAt(pos +1); return first == ';' || first == ':' - || smallerThanBeforeWhitespace(body,pos+1); + || closingBeforeWhitespace(body,pos+1); } } - private static boolean smallerThanBeforeWhitespace(CharSequence body, int pos) { + private static boolean closingBeforeWhitespace(CharSequence body, int pos) { for(int i = pos; i < body.length(); ++i) { final char c = body.charAt(i); if (Character.isWhitespace(c)) { return false; - } else if (c == '<') { + } else if (c == '<' || c == '>') { return body.length() == i + 1 || Character.isWhitespace(body.charAt(i + 1)); } }