diff options
author | Vitaly Takmazov | 2021-08-22 08:04:02 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-08-22 08:04:02 +0300 |
commit | 21010f01250e6bf9a3247e4922f88f13568fc959 (patch) | |
tree | 9b74df3f53bf96fffd03a20b631dd8ccbd647c4e /src/main/java/com/juick/util | |
parent | 18ba4d188e6f044379ec01ba2170fe57e9116c69 (diff) |
Use Microformats markup for mentions to make Mastodon happy
https://microformats.org/wiki/h-card
Diffstat (limited to 'src/main/java/com/juick/util')
-rw-r--r-- | src/main/java/com/juick/util/MessageUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/util/MessageUtils.java b/src/main/java/com/juick/util/MessageUtils.java index 12823498..7a95acb5 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 class=\"mention\" href=\"https://juick.com/$2/\">@$2</a>$3"); + msg = msg.replaceAll(jidRegex, "$1<span class=\"h-card\"><a class=\"u-url\" href=\"https://juick.com/$2/\">@$2</a></span>$3"); // @username // <a href="http://juick.com/username/">@username</a> - msg = msg.replaceAll(usernameRegex, "$1<a class=\"mention\" href=\"https://juick.com/$2/\">@$2</a>$3"); + msg = msg.replaceAll(usernameRegex, "$1<span class=\"h-card\"><a class=\"u-url\" href=\"https://juick.com/$2/\">@$2</a></span>$3"); // (http://juick.com/last?page=2) // (<a href="http://juick.com/last?page=2" rel="nofollow">juick.com</a>) |