]> git.lyx.org Git - lyx.git/blobdiff - src/BiblioInfo.cpp
* add PreBabelPreamble to Language definition (fixes #4786).
[lyx.git] / src / BiblioInfo.cpp
index 9d10b3359aef4302d0ae3fff20fe4ea530457f74..420eaa2177c87f9d1d05f92d939565fd60313136 100644 (file)
@@ -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 += "&lt;";
+                               else if (thischar == '>')
+                                       ret += "&gt;";
+                               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