fix bug 5349: properly quote InsetInfo argument

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27055 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-10-23 13:12:19 +00:00
parent 96ebd69256
commit 0790ad1b72

View 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_);
}