From: adam Date: Sat, 8 May 2004 07:47:14 +0000 (+0000) Subject: PropertyFile escapification bugfix X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=865f9307f2434c6908077fce669c6595a24e7532 PropertyFile escapification bugfix darcs-hash:20040508074714-5007d-28bd6ea4de7f2b10f1e227dce7ababd84d31cd34.gz --- diff --git a/src/org/ibex/js/PropertyFile.java b/src/org/ibex/js/PropertyFile.java index 162fc81..4e8542f 100644 --- a/src/org/ibex/js/PropertyFile.java +++ b/src/org/ibex/js/PropertyFile.java @@ -37,7 +37,8 @@ public class PropertyFile extends JS { } } - public static String escape(String s) { return s.replaceAll("\\", "\\\\").replaceAll(".", "\\.").replaceAll("=","\\="); } + public static String escape(String s) { + return s.replaceAll("\\\\", "\\\\\\\\").replaceAll(".", "\\\\.").replaceAll("=","\\\\="); } public PropertyFile(File f) throws IOException { this.f = f; this.p.load(new FileInputStream(f)); } public void put(Object key, Object val) throws JSExn { new Minion("").put(key, val); } public Enumeration keys() throws JSExn { return new Minion("").keys(); }