aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/util/MessageUtils.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-01-22 20:41:12 +0300
committerGravatar Vitaly Takmazov2019-01-22 20:41:12 +0300
commitdd7b6d46a7d0efd7198415b6bcc3e86e1d921821 (patch)
tree8904306b044d8154a1bfa2c6ae62fa1d5baf522e /src/main/java/com/juick/util/MessageUtils.java
parent7424474bb1c5e72a684544bb17498578e12f084e (diff)
fix quote escaping
Diffstat (limited to 'src/main/java/com/juick/util/MessageUtils.java')
-rw-r--r--src/main/java/com/juick/util/MessageUtils.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/com/juick/util/MessageUtils.java b/src/main/java/com/juick/util/MessageUtils.java
index 84c29807..5cc8bb97 100644
--- a/src/main/java/com/juick/util/MessageUtils.java
+++ b/src/main/java/com/juick/util/MessageUtils.java
@@ -144,6 +144,11 @@ public class MessageUtils {
}
public static String formatMessage(String msg) {
+ // > citate
+ msg = msg.replaceAll(citateRegex, "<q>$1</q>");
+ msg = msg.replaceAll("</q><q>", "\n");
+
+
msg = msg.replaceAll("&", "&amp;");
msg = msg.replaceAll("<", "&lt;");
msg = msg.replaceAll(">", "&gt;");
@@ -204,10 +209,6 @@ public class MessageUtils {
m.appendTail(sb);
msg = sb.toString();
- // > citate
- msg = msg.replaceAll(citateRegex, "<q>$1</q>");
- msg = msg.replaceAll("</q><q>", "\n");
-
msg = msg.replaceAll("\n", "<br/>\n");
return msg;
}