From 5bd1ef9d8cdd8d5a6b802814e29f0a57fd52f20b Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 5 Mar 2009 01:22:49 +0000 Subject: [PATCH] Use new isTainted and untaint methods. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5680 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/util/MessageBundle.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/com/threerings/util/MessageBundle.java b/src/java/com/threerings/util/MessageBundle.java index 645c22da2..3492c8830 100644 --- a/src/java/com/threerings/util/MessageBundle.java +++ b/src/java/com/threerings/util/MessageBundle.java @@ -172,8 +172,8 @@ public class MessageBundle { // if this string is tainted, we don't translate it, instead we // simply remove the taint character and return it to the caller - if (key.startsWith(MessageUtil.TAINT_CHAR)) { - return key.substring(1); + if (MessageUtil.isTainted(key)) { + return MessageUtil.untaint(key); } String msg = getResourceString(key); @@ -409,8 +409,8 @@ public class MessageBundle for (int i = 0; i < args.length; i++) { // if the argument is tainted, do no further translation // (it might contain |s or other fun stuff) - if (args[i].startsWith(MessageUtil.TAINT_CHAR)) { - args[i] = MessageUtil.unescape(args[i].substring(1)); + if (MessageUtil.isTainted(args[i])) { + args[i] = MessageUtil.unescape(MessageUtil.untaint(args[i])); } else { args[i] = xlate(MessageUtil.unescape(args[i])); }