]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCitation.cpp
Does not compile on older gcc.
[lyx.git] / src / insets / InsetCitation.cpp
index a5253166d9f2dd5cae97a81f666493badb8a805c..830648d1f67b1fbb8faff45006e7f578a29175cd 100644 (file)
@@ -324,7 +324,7 @@ inline docstring wrapCitation(docstring const & key,
        // we have to do the escaping here, because we will ultimately
        // write this as a raw string, so as not to escape the tags.
        return "<a href='#LyXCite-" + xml::cleanAttr(key) + "'>" +
-                       xml::xmlize(content, XMLStream::ESCAPE_ALL) + "</a>";
+                       xml::escapeString(content, XMLStream::ESCAPE_ALL) + "</a>";
 }
 
 } // anonymous namespace
@@ -552,14 +552,15 @@ void InsetCitation::docbook(XMLStream & xs, OutputParams const &) const
                return;
 
        // Split the different citations (on ","), so that one tag can be output for each of them.
-       string citations = to_utf8(xml::cleanID(getParam("key")));
+       // DocBook does not support having multiple citations in one tag, so that we have to deal with formatting here.
+       docstring citations = getParam("key");
        if (citations.find(',') == string::npos) {
-               xs << xml::CompTag("biblioref", "endterm=\"" + citations + "\"");
+               xs << xml::CompTag("biblioref", "endterm=\"" + to_utf8(xml::cleanID(citations)) + "\"");
        } else {
                size_t pos = 0;
                while (pos != string::npos) {
                        pos = citations.find(',');
-                       xs << xml::CompTag("biblioref", "endterm=\"" + citations.substr(0, pos) + "\"");
+                       xs << xml::CompTag("biblioref", "endterm=\"" + to_utf8(xml::cleanID(citations.substr(0, pos))) + "\"");
                        citations.erase(0, pos + 1);
 
                        if (pos != string::npos) {
@@ -627,7 +628,7 @@ void InsetCitation::latex(otexstream & os, OutputParams const & runparams) const
        // check if we have to do a qualified list
        vector<docstring> keys = getVectorFromString(cleanupWhitespace(key));
        bool const qualified = cs.hasQualifiedList
-               && (!getParam("pretextlist").empty()
+               && (!getParam("F").empty()
                    || !getParam("posttextlist").empty());
 
        if (runparams.inulemcmd > 0)