]> git.lyx.org Git - features.git/commitdiff
LyXRC: escape existing quote characters in 'cmd'
authorScott Kostyshak <skostysh@lyx.org>
Sat, 12 Jan 2013 21:00:52 +0000 (16:00 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Tue, 12 Feb 2013 06:21:33 +0000 (01:21 -0500)
(cherry picked from commit a4a836916b1257b215546b2b7886e009df5876a9)

src/LyXRC.cpp

index 2a1e0168b4600dddcda8156533b13818591a6815..c59cb8ef84a7d673888e0e0cf0b062a160af7b0e 100644 (file)
@@ -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)