PropertyFile escapification bugfix
authoradam <adam@megacz.com>
Sat, 8 May 2004 07:47:14 +0000 (07:47 +0000)
committeradam <adam@megacz.com>
Sat, 8 May 2004 07:47:14 +0000 (07:47 +0000)
darcs-hash:20040508074714-5007d-28bd6ea4de7f2b10f1e227dce7ababd84d31cd34.gz

src/org/ibex/js/PropertyFile.java

index 162fc81..4e8542f 100644 (file)
@@ -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(); }