From c4d7e0da9accfe7aed04c768892b08e18ad085fd Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Wed, 13 Jul 2011 12:21:20 -0600 Subject: [PATCH] rename quote method to escape --- src/com/dogcows/Util.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/com/dogcows/Util.java b/src/com/dogcows/Util.java index 3253ae2..412ef4a 100644 --- a/src/com/dogcows/Util.java +++ b/src/com/dogcows/Util.java @@ -61,12 +61,12 @@ public abstract class Util } /** - * Quote a string by replacing prepending backslashes and double + * Escape a string by replacing prepending backslashes and double * quotation characters with an extra backslash. - * @param The string to be quoted. - * @return The quoted string. + * @param The string to be escaped. + * @return The escaped string. */ - public static String quote(String a) + public static String escape(String a) { a = a.replaceAll("\\\\", "\\\\\\\\"); a = a.replaceAll("\"", "\\\\\\\""); @@ -151,8 +151,7 @@ public abstract class Util String text = template; for (String key : terms.keySet()) { - text = text.replaceAll("\\$" + key + "\\$", - Util.quote(terms.get(key))); + text = text.replaceAll("\\$" + key + "\\$", Util.escape(terms.get(key))); } return text; } -- 2.43.0