* InsetFloat.cpp (getCaption):

- Protect content which has a "]" in subfloat captions.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37416 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2011-02-02 11:05:56 +00:00
parent 83c06abbc0
commit 4b91536197

View File

@ -490,7 +490,14 @@ docstring InsetFloat::getCaption(OutputParams const & runparams) const
otexstream os(ods);
ins->getOptArg(os, runparams);
ods << '[';
ins->getArgument(os, runparams);
odocstringstream odss;
otexstream oss(odss);
ins->getArgument(oss, runparams);
docstring arg = odss.str();
// Protect ']'
if (arg.find(']') != docstring::npos)
arg = '{' + arg + '}';
ods << arg;
ods << ']';
return ods.str();
}