]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetRef.cpp
DocBook: escape IDs for InsetRef.
[lyx.git] / src / insets / InsetRef.cpp
index d41f0a1165a72ffbcec34e2c40c1f7a69716b048..c5d097a37b8128a7881f419a8af1cf43bd9c327d 100644 (file)
@@ -354,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;