diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-12-10 21:05:28 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-12-10 21:05:28 +0100 |
commit | 8d5009da26ad9feda9ccb77160102b8a2c88d29f (patch) | |
tree | 818f5f472f87442493b58b3cef9671bad2741006 | |
parent | 27bbc86655e26e63d63f424d838129bcab42ed2e (diff) |
avoid some false positive quotes
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/UIHelper.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/UIHelper.java b/src/main/java/de/pixart/messenger/utils/UIHelper.java index 9e0a571b0..a5c0aa317 100644 --- a/src/main/java/de/pixart/messenger/utils/UIHelper.java +++ b/src/main/java/de/pixart/messenger/utils/UIHelper.java @@ -317,16 +317,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)); } } |