]> git.lyx.org Git - lyx.git/commitdiff
DocBook: escape IDs for InsetRef.
authorThibaut Cuvelier <tcuvelier@lyx.org>
Tue, 21 Jul 2020 00:44:11 +0000 (02:44 +0200)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Tue, 21 Jul 2020 00:45:04 +0000 (02:45 +0200)
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;