]> git.lyx.org Git - features.git/commitdiff
Escape link name for DocBook.
authorRichard Heck <rgheck@lyx.org>
Sun, 8 Jan 2017 18:38:48 +0000 (13:38 -0500)
committerRichard Heck <rgheck@lyx.org>
Sun, 8 Jan 2017 18:38:48 +0000 (13:38 -0500)
Thanks to Martin Brown for pointing out the bug, and the obvious
solution.

src/insets/InsetHyperlink.cpp

index 8b3433c944b0b105afb84800cc1245b470df561e..3160c0b0010945f6bc01387d754d3153747a8d5e 100644 (file)
@@ -22,6 +22,7 @@
 #include "LaTeXFeatures.h"
 #include "OutputParams.h"
 #include "output_xhtml.h"
+#include "sgml.h"
 #include "texstream.h"
 
 #include "support/docstream.h"
@@ -233,7 +234,7 @@ int InsetHyperlink::docbook(odocstream & os, OutputParams const &) const
        os << "<ulink url=\""
           << subst(getParam("target"), from_ascii("&"), from_ascii("&amp;"))
           << "\">"
-          << getParam("name")
+          << sgml::escapeString(getParam("name"))
           << "</ulink>";
        return 0;
 }