return Change::UNCHANGED;
}
+
+/// quotes a string for use as an argument of the "log" dialog
+string const quoteArg(string const & arg)
+{
+ ostringstream os;
+ os << '"' << subst(subst(arg, "\\", "\\\\"), "\"", "\\\"") << '"';
+ return os.str();
+}
+
}
LyXFunc::LyXFunc(LyXView * lv)
data = "literate ";
break;
}
- data += logfile.second;
+ data += quoteArg(logfile.second);
owner->getDialogs().show("log", data);
} else if (name == "vclog") {
string const data = "vc " +
- owner->buffer()->lyxvc().getLogFile();
+ quoteArg(owner->buffer()->lyxvc().getLogFile());
owner->getDialogs().show("log", data);
} else
owner->getDialogs().show(name, data);