]> git.lyx.org Git - features.git/commitdiff
fix bug 5349: properly quote InsetInfo argument
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 23 Oct 2008 13:12:19 +0000 (13:12 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 23 Oct 2008 13:12:19 +0000 (13:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27055 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetInfo.cpp

index 446dc4ca4edef19f701de1633015559e2fd76c96..0704c4d819fba6ac061d61514582fd45a2a5d132 100644 (file)
@@ -129,7 +129,7 @@ void InsetInfo::read(Lexer & lex)
                        token = lex.getString();
                        type_ = nameTranslator().find(token);
                } else if (token == "arg") {
-                       lex.next();
+                       lex.next(true);
                        name_ = lex.getString();
                } else if (token == "\\end_inset")
                        break;
@@ -147,7 +147,8 @@ void InsetInfo::read(Lexer & lex)
 
 void InsetInfo::write(ostream & os) const
 {
-       os << "Info\ntype  \"" << infoType() << "\"\narg   \"" << name_ << '\"';
+       os << "Info\ntype  \"" << infoType() 
+          << "\"\narg   " << Lexer::quoteString(name_);
 }