Escape strings in option files used for jobs properly

This commit is contained in:
Moritz Bunkus 2011-01-20 11:40:51 +01:00
parent 13680ed09a
commit 58c121d40c

View File

@ -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"));