From 58c121d40cc38f2b2d85814553585f82005e7018 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 20 Jan 2011 11:40:51 +0100 Subject: [PATCH] Escape strings in option files used for jobs properly --- src/mmg/jobs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mmg/jobs.cpp b/src/mmg/jobs.cpp index eb3cdd582..d592cccdf 100644 --- a/src/mmg/jobs.cpp +++ b/src/mmg/jobs.cpp @@ -36,6 +36,7 @@ #include "common/common_pch.h" #include "common/fs_sys_helpers.h" +#include "common/strings/formatting.h" #include "mmg/jobs.h" #include "mmg/mmg.h" #include "mmg/mmg_dialog.h" @@ -203,7 +204,7 @@ job_run_dialog::start_next_job() { if ((*arg_list)[i].Length() == 0) opt_file->Write(wxT("#EMPTY#")); else { - std::string arg_utf8 = wxMB((*arg_list)[i]); + std::string arg_utf8 = escape(wxMB((*arg_list)[i])); opt_file->Write(arg_utf8.c_str(), arg_utf8.length()); } opt_file->Write(wxT("\n"));