Escape backslashes prior to escaping the quotes

This commit is contained in:
Dave Smith 2010-06-21 14:48:37 -06:00
parent 07b20d16f8
commit f3039c7a87

View file

@ -306,5 +306,6 @@ execute_overlay([Other | _Rest], _Vars, _BaseDir, _TargetDir) ->
%% %%
render(Bin, Context) -> render(Bin, Context) ->
%% Be sure to escape any double-quotes before rendering... %% Be sure to escape any double-quotes before rendering...
Str = re:replace(Bin, "\"", "\\\\\"", [global, {return,list}]), Str0 = re:replace(Bin, "\\\\", "\\\\\\", [global, {return, list}]),
mustache:render(Str, Context). Str1 = re:replace(Str0, "\"", "\\\\\"", [global, {return,list}]),
mustache:render(Str1, Context).