From d78a9051753dd8afcde8f9c82881cf66b7bdfe12 Mon Sep 17 00:00:00 2001 From: Zak Ford Date: Thu, 24 Jan 2013 11:43:10 -0500 Subject: Prevent replacement of { and } characters in chat.format --- Essentials/src/com/earth2me/essentials/Settings.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 95123d051..b88ba9e63 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -415,7 +415,8 @@ public class Settings implements ISettings format = format.replace("{MESSAGE}", "%2$s"); format = format.replace("{WORLDNAME}", "{1}"); format = format.replace("{SHORTWORLDNAME}", "{2}"); - format = format.replaceAll("\\{(\\D*?)\\}", "\\[$1\\]"); + format = format.replaceAll("'", "''"); + format = format.replaceAll("\\{(\\D*?)\\}", "\\'{$1\\}'"); format = "§r".concat(format); mFormat = new MessageFormat(format); chatFormats.put(group, mFormat); -- cgit v1.2.3