From ca01edf59fe79320bd2ec53ab6b7495bd1d53a5b Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Tue, 21 Jul 2020 02:44:11 +0200 Subject: [PATCH] DocBook: escape IDs for InsetRef. --- src/insets/InsetRef.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index d41f0a1165..c5d097a37b 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -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; -- 2.39.5