Escape link name for DocBook.

Thanks to Martin Brown for pointing out the bug, and the obvious
solution.

(cherry picked from commit 06e2669b35)
This commit is contained in:
Richard Heck 2017-01-08 13:38:48 -05:00
parent f7558646b1
commit 3a1eff90b9
2 changed files with 6 additions and 1 deletions

View 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;
}

View 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