]> git.lyx.org Git - features.git/commitdiff
Restore XHTML output for InsetHyperlink.
authorRichard Heck <rgheck@comcast.net>
Wed, 25 Nov 2009 22:19:59 +0000 (22:19 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 25 Nov 2009 22:19:59 +0000 (22:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32209 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetHyperlink.cpp
src/insets/InsetHyperlink.h

index 7338141ba8c67d09ddbdf71692d2d56a5cfa7893..6351f153223de13491ddde381bf39c11b5054a24 100644 (file)
@@ -17,6 +17,7 @@
 #include "FuncRequest.h"
 #include "LaTeXFeatures.h"
 #include "OutputParams.h"
+#include "output_xhtml.h"
 
 #include "support/docstream.h"
 #include "support/gettext.h"
@@ -181,14 +182,11 @@ int InsetHyperlink::docbook(odocstream & os, OutputParams const &) const
 }
 
 
-docstring InsetHyperlink::xhtml(odocstream & os, OutputParams const &) const
+docstring InsetHyperlink::xhtml(XHTMLStream & xs, OutputParams const &) const
 {
-       os << "<a href=\""
-                       // FIXME Do we need to do more escaping than this?
-          << subst(getParam("target"), from_ascii("&"), from_ascii("&amp;"))
-          << "\">"
-          << getParam("name")
-          << "</a>";
+       xs << StartTag("a", to_utf8("href=\"" + getParam("target") + "\""));
+       xs << getParam("name");
+       xs << EndTag("a");
        return docstring();
 }
 
index bbcd6f9fe7684295c855e616dab7acd382538d56..54850611acec2f3640446f4a383cebedc4cf91b3 100644 (file)
@@ -41,7 +41,7 @@ public:
        ///
        int docbook(odocstream &, OutputParams const &) const;
        ///
-       docstring xhtml(odocstream &, OutputParams const &) const;
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
        /// the string that is passed to the TOC
        void tocString(odocstream &) const;
        ///