From ed8abc7cc4fb8cdeb6dbb25ecedc1cd40e1e6323 Mon Sep 17 00:00:00 2001 From: Jason Barnabe Date: Sat, 5 May 2012 22:48:03 -0500 Subject: [PATCH] issue 25: only first backslash is escaped when converting to mozilla format --- edit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edit.js b/edit.js index 9675c349..f06f955e 100644 --- a/edit.js +++ b/edit.js @@ -226,7 +226,8 @@ function toMozillaFormat() { } var mf = "@-moz-document "; mf += section.meta.map(function(meta) { - return meta[0] + "(\"" + meta[1].replace("\\", "\\\\") + "\")"; + // escape the meta according to css rules + return meta[0] + "(\"" + meta[1].replace(/\\/g, "\\\\") + "\")"; }).join(", "); return mf + " {\n" + section.code + "\n}"; }).join("\n\n");