]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLabel.cpp
Remove all BufferParam arguments in InsetXXX methods (since insets know about their...
[lyx.git] / src / insets / InsetLabel.cpp
index 9de72d970143d8eb9cbbb9f465a4900c3f3e7bae..93ccc40b28abc591ef469875ba958b064e548d60 100644 (file)
@@ -23,6 +23,7 @@
 #include "FuncStatus.h"
 #include "InsetIterator.h"
 #include "LyXFunc.h"
+#include "output_xhtml.h"
 #include "ParIterator.h"
 #include "sgml.h"
 #include "Text.h"
@@ -175,7 +176,7 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
                InsetCommandParams p(REF_CODE, "ref");
                p["reference"] = getParam("name");
                cap::clearSelection();
-               cap::copyInset(cur, new InsetRef(*cur.buffer(), p), getParam("name"));
+               cap::copyInset(cur, new InsetRef(buffer(), p), getParam("name"));
                break;
        }
 
@@ -218,11 +219,10 @@ int InsetLabel::docbook(odocstream & os, OutputParams const & runparams) const
 }
 
 
-int InsetLabel::xhtml(odocstream & os, OutputParams const & /*runparams*/) const
+docstring InsetLabel::xhtml(odocstream & os, OutputParams const &) const
 {
-       // FIXME Does this need to be escaped?
-       os << "<a name=\"" << getParam("name") << "\"></a>";
-       return 0;
+       os << "<a name=\"" << html::htmlize(getParam("name")) << "\"></a>";
+       return docstring();
 }
 
 } // namespace lyx