]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.C
Don't remove cell selections after fontchange.
[lyx.git] / src / insets / inseturl.C
index 2be9d6d96f648a49064bb6dff13329412c6cdc61..848584044fbc0508b1678230eac65aaeacd97637 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,7 +36,7 @@ void InsetUrl::edit(BufferView * bv, bool)
 string const InsetUrl::getScreenLabel(Buffer const *) const
 {
        string temp;
-       if (getCmdName() == "url" )
+       if (getCmdName() == "url")
                temp = _("Url: ");
        else 
                temp = _("HtmlUrl: ");
@@ -83,8 +84,8 @@ int InsetUrl::linuxdoc(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;
 }