diff options
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/juick/util/MessageUtils.java | 4 | ||||
-rw-r--r-- | src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/juick/util/MessageUtils.java b/src/main/java/com/juick/util/MessageUtils.java index b0093b38..12823498 100644 --- a/src/main/java/com/juick/util/MessageUtils.java +++ b/src/main/java/com/juick/util/MessageUtils.java @@ -194,11 +194,11 @@ public class MessageUtils { // @username@jabber.org // <a href="http://juick.com/username@jabber.org/">@username@jabber.org</a> - msg = msg.replaceAll(jidRegex, "$1<a href=\"https://juick.com/$2/\">@$2</a>$3"); + msg = msg.replaceAll(jidRegex, "$1<a class=\"mention\" href=\"https://juick.com/$2/\">@$2</a>$3"); // @username // <a href="http://juick.com/username/">@username</a> - msg = msg.replaceAll(usernameRegex, "$1<a href=\"https://juick.com/$2/\">@$2</a>$3"); + msg = msg.replaceAll(usernameRegex, "$1<a class=\"mention\" href=\"https://juick.com/$2/\">@$2</a>$3"); // (http://juick.com/last?page=2) // (<a href="http://juick.com/last?page=2" rel="nofollow">juick.com</a>) diff --git a/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java b/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java index 90e0547f..aea76b2a 100644 --- a/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java +++ b/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java @@ -46,7 +46,7 @@ public class FormatMessageFilter implements Filter { return new SafeString(formattedMessage); } else { String toUserString = msg.getTo().getUid() == 0 ? String.format("<a href=\"%s\" data-user-uri=\"1\">@%s</a>", - msg.getTo().getUri().toASCIIString(), msg.getTo().getName()) : String.format("<a href=\"https://juick.com/%s/\">@%s</a>", msg.getTo().getName(), msg.getTo().getName()); + msg.getTo().getUri().toASCIIString(), msg.getTo().getName()) : String.format("<a class=\"mention\" href=\"https://juick.com/%s/\">@%s</a>", msg.getTo().getName(), msg.getTo().getName()); String formatString = MessageUtils.replyStartsWithQuote(msg) ? "%s,\n%s" : "%s, %s"; String msgTxt = msg.getRid() > 0 ? String.format(formatString, toUserString, formattedMessage) : formattedMessage; |