]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetRef.cpp
Improved character count statistics for letter based insets (e.g. the LyX logo).
[features.git] / src / insets / InsetRef.cpp
index e9b26953976a729bb4e2a2967859600f1d6fd865..c5d097a37b8128a7881f419a8af1cf43bd9c327d 100644 (file)
@@ -287,8 +287,6 @@ void InsetRef::latex(otexstream & os, OutputParams const & rp) const
                }
        }
        else {
-               // We don't want to output p_["name"], since that is only used
-               // in docbook. So we construct new params, without it, and use that.
                InsetCommandParams p(REF_CODE, cmd);
                docstring const ref = getParam("reference");
                p["reference"] = ref;
@@ -356,7 +354,7 @@ void InsetRef::docbook(XMLStream & xs, OutputParams const &) const
        }
 
        // No name, ask DocBook to generate one.
-       docstring attr = from_utf8("linkend=\"") + ref + from_utf8("\"");
+       docstring attr = from_utf8("linkend=\"") + xml::cleanID(ref) + from_utf8("\"");
        if (!role.empty())
                attr += " role=\"" + role + "\"";
        xs << display_before;