]> git.lyx.org Git - lyx.git/blobdiff - src/BiblioInfo.cpp
Revert previous commit, which committed too much.
[lyx.git] / src / BiblioInfo.cpp
index 9d10b3359aef4302d0ae3fff20fe4ea530457f74..c031058aa341f76201acd0b62ea89b9be5081649 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
@@ -818,6 +830,8 @@ vector<docstring> const BiblioInfo::getAuthorYearStrings(
 void BiblioInfo::mergeBiblioInfo(BiblioInfo const & info)
 {
        bimap_.insert(info.begin(), info.end());
+       field_names_.insert(info.field_names_.begin(), info.field_names_.end());
+       entry_types_.insert(info.entry_types_.begin(), info.entry_types_.end());
 }