]> 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:51:18 +0000 (13:51 -0500)
Thanks to Martin Brown for pointing out the bug, and the obvious
solution.

(cherry picked from commit 06e2669b354561ebafcd69c24d0319d47ba1d279)

src/insets/InsetHyperlink.cpp
status.22x

index 54f1f2c765338b9b4c5b97d45e11a73a83da7f0e..039f553d1bc6c49aeebbd41be02d91b38c7daf5c 100644 (file)
@@ -22,6 +22,7 @@
 #include "LaTeXFeatures.h"
 #include "OutputParams.h"
 #include "output_xhtml.h"
+#include "sgml.h"
 
 #include "support/docstream.h"
 #include "support/FileName.h"
@@ -232,7 +233,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;
 }
index 62bb7ff4f038e8882df5050805f99284ab4fd5c1..261968292ea058e61d5a1c5122f1c5e10f7b66bc 100644 (file)
@@ -112,6 +112,10 @@ What's new
     set to [None] or OT1 but the global default is T1.
   # Quote type ignored for LyXHTML: always "English" quotes used. 
 
+- Output correct identifier for DocBook XML.
+
+- Correctly escape hyperlinks for DocBook output.
+
 
 * LYX2LYX