diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-01-24 08:53:32 -0800 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-01-24 08:53:32 -0800 |
commit | fec06105ff889941df994693efb5de47c671e03e (patch) | |
tree | 52d6af61003462552042170f6859c6960a6e35c3 | |
parent | d809e13837a5d17f5cf570297f36f94307bb529f (diff) | |
parent | d78a9051753dd8afcde8f9c82881cf66b7bdfe12 (diff) | |
download | Essentials-fec06105ff889941df994693efb5de47c671e03e.tar Essentials-fec06105ff889941df994693efb5de47c671e03e.tar.gz Essentials-fec06105ff889941df994693efb5de47c671e03e.tar.lz Essentials-fec06105ff889941df994693efb5de47c671e03e.tar.xz Essentials-fec06105ff889941df994693efb5de47c671e03e.zip |
Merge pull request #284 from phrstbrn/chat-braces-fix
Prevent replacement of { and } characters in chat.format
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Settings.java | 3 |
1 files changed, 2 insertions, 1 deletions
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); |