X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FBiblioInfo.cpp;h=420eaa2177c87f9d1d05f92d939565fd60313136;hb=12c7e7dde3851ad894380fd42ba741dd3d0cbcc7;hp=9d10b3359aef4302d0ae3fff20fe4ea530457f74;hpb=615d42d357e782a7d8c10c82e9e2833cc781f328;p=lyx.git diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index 9d10b3359a..420eaa2177 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -491,7 +491,19 @@ docstring BibTeXInfo::expandFormat(string const & format, } else if (scanning_key) key += char(thischar); - else if (richtext || !scanning_rich) + else if (richtext) { + if (scanning_rich) + ret += thischar; + else { + // we need to escape '<' and '>' + if (thischar == '<') + ret += "<"; + else if (thischar == '>') + ret += ">"; + else + ret += thischar; + } + } else if (!scanning_rich /* && !richtext */) ret += thischar; // else the character is discarded, which will happen only if // richtext == false and we are scanning rich text