diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 2a1e0168b4..c59cb8ef84 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -2785,7 +2785,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c || sysfmt == sysend // format not found || sysfmt->second.count(cmd) == 0 // this command not found ) - os << "\\viewer_alternatives " << fmt << " \"" << cmd << "\"\n"; + os << "\\viewer_alternatives " << fmt << " \"" << escapeCommand(cmd) << "\"\n"; } } if (tag != RC_LAST) @@ -2810,7 +2810,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c || sysfmt == sysend // format not found || sysfmt->second.count(cmd) == 0 // this command not found ) - os << "\\editor_alternatives " << fmt << " \"" << cmd << "\"\n"; + os << "\\editor_alternatives " << fmt << " \"" << escapeCommand(cmd) << "\"\n"; } } if (tag != RC_LAST)