--- src/url.c.old	Sun Jan 10 02:47:20 1999
+++ src/url.c	Sun Jan 10 04:40:10 1999
@@ -56,9 +56,9 @@
    encoding, and \033 for safe printing.  */
 
 #ifndef WINDOWS
-# define URL_UNSAFE " <>\"#%{}|\\^~[]`@:\033"
+# define URL_UNSAFE "& <>\"#%{}|\\^~[]`@:\033"
 #else  /* WINDOWS */
-# define URL_UNSAFE " <>\"%{}|\\^[]`\033"
+# define URL_UNSAFE "& <>\"%{}|\\^[]`\033"
 #endif /* WINDOWS */
 
 /* If S contains unsafe characters, free it and replace it with a
@@ -627,7 +627,7 @@
 str_url (const struct urlinfo *u, int hide)
 {
   char *res, *host, *user, *passwd, *proto_name, *dir, *file;
-  int i, l, ln, lu, lh, lp, lf, ld;
+  int i, l, ln, lu, lh, lp, lf, ld, offset;
 
   /* Look for the protocol name.  */
   for (i = 0; i < ARRAY_SIZE (sup_protos); i++)
@@ -638,7 +638,27 @@
   proto_name = sup_protos[i].name;
   host = CLEANDUP (u->host);
   dir = CLEANDUP (u->dir);
+  l = strlen(dir);
+  offset = 0;
+  for(i = 0, offset = 0; i < l ; i++, offset++) {
+    dir[offset] = dir[i];
+    if(strncasecmp(dir + i, "%26amp;", 7) == 0) {
+      i += 6;
+      offset += 2;
+    }
+  }
+  dir[offset] = 0;
   file = CLEANDUP (u->file);
+  l = strlen(file);
+  offset = 0;
+  for(i = 0, offset = 0; i < l ; i++, offset++) {
+    file[offset] = file[i];
+    if(strncasecmp(file + i, "%26amp;", 7) == 0) {
+      i += 6;
+      offset += 2;
+    }
+  }
+  file[offset] = 0;
   user = passwd = NULL;
   if (u->user)
     user = CLEANDUP (u->user);
