Hi Micha, On Wed, Sep 12, 2007 at 12:38:51PM +0200, Michaël Cadilhac wrote: > >> --- browse-url.el 12 Sep 2007 10:49:04 +0200 1.61 > >> +++ browse-url.el 12 Sep 2007 11:09:27 +0200 > > [...] > >> - (setq file (browse-url-encode-url file)) > >> + (setq file (browse-url-encode-url file "[*\"()',=;? ]" 'encode-percent)) > > [...] > >> - (setq url (browse-url-encode-url url)) > >> + (setq url (browse-url-encode-url url "[,)$]")) > > [...] > >> - (setq url (browse-url-encode-url url)) > >> + (setq url (browse-url-encode-url url "[,)$]")) > > [...] > >> - (setq url (browse-url-encode-url url)) > >> + (setq url (browse-url-encode-url url "[,)$]")) > > [...] > >> - (setq url (browse-url-encode-url url)) > >> + (setq url (browse-url-encode-url url "[,)$]")) > > [...] > >> - (setq url (browse-url-encode-url url)) > >> + (setq url (browse-url-encode-url url "[,)$]")) > > [...] > >> - (setq url (browse-url-encode-url url)) > >> + (setq url (browse-url-encode-url url "[,)$]")) > > > > These use mostly the same argument. Can't we generalize this? Would it hurt > > the callsites if they all would use "[*\"()',=;? ]"? > > Yes, it will. A ``confusing char'' is just something Firefox or others > can consider as a URL separator or as a variable or something when the > website is passed as an argument to the executable, AFAIU. > > `?=*' for example are not usually ``confusing''. The only place those > chars are to be converted is when we browse for a file (thus when `?=' > don't have their special meanings). Ah, okay. So what about an (&optional filename) for this function? And if it's true, the character set to be translated is "[*\"()',=;? ]" and percent is also encoded. If ommited (nil), just "[,)$]" will be translated. How does that sound? Hannes