From f3039c7a87af03e7e5f8b71f82f22d8072f5b298 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Mon, 21 Jun 2010 14:48:37 -0600 Subject: [PATCH] Escape backslashes prior to escaping the quotes --- src/rebar_reltool.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rebar_reltool.erl b/src/rebar_reltool.erl index 19c7433..142c1d8 100644 --- a/src/rebar_reltool.erl +++ b/src/rebar_reltool.erl @@ -306,5 +306,6 @@ execute_overlay([Other | _Rest], _Vars, _BaseDir, _TargetDir) -> %% render(Bin, Context) -> %% Be sure to escape any double-quotes before rendering... - Str = re:replace(Bin, "\"", "\\\\\"", [global, {return,list}]), - mustache:render(Str, Context). + Str0 = re:replace(Bin, "\\\\", "\\\\\\", [global, {return, list}]), + Str1 = re:replace(Str0, "\"", "\\\\\"", [global, {return,list}]), + mustache:render(Str1, Context).