From dd7b6d46a7d0efd7198415b6bcc3e86e1d921821 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 22 Jan 2019 20:41:12 +0300 Subject: fix quote escaping --- src/main/java/com/juick/util/MessageUtils.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java') 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, "$1"); + msg = msg.replaceAll("", "\n"); + + msg = msg.replaceAll("&", "&"); msg = msg.replaceAll("<", "<"); msg = msg.replaceAll(">", ">"); @@ -204,10 +209,6 @@ public class MessageUtils { m.appendTail(sb); msg = sb.toString(); - // > citate - msg = msg.replaceAll(citateRegex, "$1"); - msg = msg.replaceAll("", "\n"); - msg = msg.replaceAll("\n", "
\n"); return msg; } -- cgit v1.2.3