]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.C
fix typo that put too many include paths for most people
[lyx.git] / src / insets / inseturl.C
index 0b95b22a27a28f518fa77719a892d29fb2ef657b..d52b6afaafacc95e1655977a51975d8cdc7f4c18 100644 (file)
@@ -10,6 +10,7 @@
 #include "LyXView.h"
 #include "debug.h"
 #include "frontends/Dialogs.h"
+#include "support/lstrings.h"
 #include "gettext.h"
 
 using std::ostream;
@@ -22,7 +23,7 @@ InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
 
 void InsetUrl::edit(BufferView * bv, int, int, unsigned int)
 {
-       bv->owner()->getDialogs()->showUrl( this );
+       bv->owner()->getDialogs()->showUrl(this);
 }
 
 
@@ -35,9 +36,9 @@ void InsetUrl::edit(BufferView * bv, bool)
 string const InsetUrl::getScreenLabel(Buffer const *) const
 {
        string temp;
-       if (getCmdName() == "url" )
+       if (getCmdName() == "url")
                temp = _("Url: ");
-       else 
+       else
                temp = _("HtmlUrl: ");
 
        if (!getOptions().empty())
@@ -81,10 +82,10 @@ int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
 }
 
 
-int InsetUrl::DocBook(Buffer const *, ostream & os) const
+int InsetUrl::docbook(Buffer const *, ostream & os) const
 {
-       os << "<ulink url=\"" << getContents() << "\">"
-          << getOptions() << "</ulink>";
+       os << "<ulink url=\"" << subst(getContents(),"&","&amp;")
+          << "\">" << getOptions() << "</ulink>";
        return 0;
 }