* InsetFloat.cpp (getCaption):

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

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@37421 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2011-02-02 15:43:58 +00:00
parent 00ea441ba1
commit 8621d9d2d1
2 changed files with 9 additions and 1 deletions

View File

@ -468,7 +468,13 @@ docstring InsetFloat::getCaption(OutputParams const & runparams) const
static_cast<InsetCaption *>(it->inset);
ins->getOptArg(ods, runparams);
ods << '[';
ins->getArgument(ods, runparams);
odocstringstream odss;
ins->getArgument(odss, runparams);
docstring arg = odss.str();
// Protect ']'
if (arg.find(']') != docstring::npos)
arg = '{' + arg + '}';
ods << arg;
ods << ']';
return ods.str();
}

View File

@ -65,6 +65,8 @@ What's new
- Correctly break URLs at the end of lines in DVI output when hyperref
is used (bug 7033).
- Escape "]" in subfloat captions to prevent LaTeX failure.
- Fix DVI output of the document class "letter (lettre)".
- Do not output PDF settings if these are disabled in the document