--On Friday, February 01, 2002 10:17:23 AM +0000 Jose Abilio Oliveira
Matos <[EMAIL PROTECTED]> wrote:

>> manual replace of "&" with "&amp;"
> 
>   The correct fix is to escape all the chars inside the url,
> usually the only  one that gives trouble is &, as I don't expect <
> and > to be present inside  any url. Actually I think that & is not
> allowed also, but I know lots of url  that use them so...
> 
> Try this patch, it should fix that:
> 
> diff -u -p -r1.33 inseturl.C
> --- inseturl.C  2000/11/04 10:00:11     1.33
> +++ inseturl.C  2002/02/01 10:09:38
> @@ -10,6 +10,7 @@
>  #include "LyXView.h"
>  #include "debug.h"
>  #include "frontends/Dialogs.h"
> +#include "support/lstrings.h"
> 
>  using std::ostream;
> 
> @@ -76,8 +77,8 @@ int InsetUrl::Linuxdoc(Buffer const *, o
> 
>  int InsetUrl::DocBook(Buffer const *, ostream & os) const
>  {
> -       os << "<ulink url=\"" << getContents() << "\">"
> -          << getOptions() << "</ulink>";
> +       os << "<ulink url=\"" << subst(getContents(),"&","&amp;")
> +          << "\">" << getOptions() << "</ulink>";
>         return 0;
>  }

Working! 

Thank you very much,
        Peter

Reply via email to