diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 2aa6473b34..319d21692b 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -1860,7 +1860,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c case RC_FORWARD_SEARCH: if (ignore_system_lyxrc || forward_search != system_lyxrc.forward_search) { - os << "\\forward_search \"" << forward_search << "\"\n"; + os << "\\forward_search \"" << escapeCommand(forward_search) << "\"\n"; } if (tag != RC_LAST) break;