all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* browse-url does not allow url with a dollar sign
@ 2004-02-26 10:14 Harald Maier
  2004-02-27  2:11 ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Harald Maier @ 2004-02-26 10:14 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.3.1 (i686-pc-linux-gnu, Motif Version 2.2.2)
 of 2003-05-20 on ate
configured using `configure  --with-x-toolkit=motif'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE@euro
  locale-coding-system: iso-latin-9
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Start emacs with 'emacs -q'. Put into the *scratch* buffer the following line:

http://www.warentest.de/pls/sw/SW$NAV.Startup?p_KNR=0&p_E1=2&p_E2=0&p_E3=50&p_E4=0&p_Inh=I:1162925

Place point to the url and then type in the following function:

  M-x browse-url-at-point

The browser program receives as url the following string:

http://www.warentest.de/pls/sw/SW.Startup?p_KNR=0&p_E1=2&p_E2=0&p_E3=50&p_E4=0&p_Inh=I:1162925

It seems that the dollar sign '$' in the url needs to be escaped.

Harald

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: browse-url does not allow url with a dollar sign
       [not found] <mailman.559.1077790489.340.bug-gnu-emacs@gnu.org>
@ 2004-02-26 17:59 ` Kevin Rodgers
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2004-02-26 17:59 UTC (permalink / raw)


Harald Maier wrote:
 > Start emacs with 'emacs -q'. Put into the *scratch* buffer the following line:
 >
 > http://www.warentest.de/pls/sw/SW$NAV.Startup?p_KNR=0&p_E1=2&p_E2=0&p_E3=50&p_E4=0&p_Inh=I:1162925
 >
 > Place point to the url and then type in the following function:
 >
 >   M-x browse-url-at-point
 >
 > The browser program receives as url the following string:
 >
 > http://www.warentest.de/pls/sw/SW.Startup?p_KNR=0&p_E1=2&p_E2=0&p_E3=50&p_E4=0&p_Inh=I:1162925
 >
 > It seems that the dollar sign '$' in the url needs to be escaped.

I don't see why this is happening.  The URL is returned verbatim by the
browse-url-url-at-point function and passed to browse-url, and then to
browse-url-browser-function (default: browse-url-netscape).  None of the
browser functions defined in browse-url.el invoke the browser program
via a shell, which would require the $ (and any other shell
metacharacters) to be quoted -- the only exception is
browse-url-default-windows-browser, which invokes "start" on MS-DOS and
does quote the URL.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: browse-url does not allow url with a dollar sign
  2004-02-26 10:14 browse-url does not allow url with a dollar sign Harald Maier
@ 2004-02-27  2:11 ` Juri Linkov
       [not found]   ` <87r7wbigo9.fsf@mail.jurta.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2004-02-27  2:11 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Harald Maier <harald@maierh.de> writes:
> Start emacs with 'emacs -q'. Put into the *scratch* buffer the following line:
>
> http://www.warentest.de/pls/sw/SW$NAV.Startup?p_KNR=0&p_E1=2&p_E2=0&p_E3=50&p_E4=0&p_Inh=I:1162925
>
> Place point to the url and then type in the following function:
>
>   M-x browse-url-at-point
>
> The browser program receives as url the following string:
>
> http://www.warentest.de/pls/sw/SW.Startup?p_KNR=0&p_E1=2&p_E2=0&p_E3=50&p_E4=0&p_Inh=I:1162925

Even if you said you started emacs with 'emacs -q', I don't know what
default browser you use.  A suitable browser is selected by attempting
in this order: gnome-moz-remote, Mozilla, Galeon, Netscape, Mosaic,
IXI Mosaic, Lynx in an xterm, MMM, Konqueror, W3.  It seems that
you are using a Mozilla-based browser.  It substitutes environment
variables references even when they are quoted in the program arguments.
So, the dollar sign '$' in the url needs to be encoded in browse-url.el.

Index: emacs/lisp/net/browse-url.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/browse-url.el,v
retrieving revision 1.32
diff -c -r1.32 browse-url.el
*** emacs/lisp/net/browse-url.el	1 Sep 2003 15:45:33 -0000	1.32
--- emacs/lisp/net/browse-url.el	27 Feb 2004 01:38:23 -0000
***************
*** 818,825 ****
  used instead of `browse-url-new-window-flag'."
    (interactive (browse-url-interactive-arg "URL: "))
    ;; URL encode any `confusing' characters in the URL.  This needs to
!   ;; include at least commas; presumably also close parens.
!   (while (string-match "[,)]" url)
      (setq url (replace-match
  	       (format "%%%x" (string-to-char (match-string 0 url))) t t url)))
    (let* ((process-environment (browse-url-process-environment))
--- 818,825 ----
  used instead of `browse-url-new-window-flag'."
    (interactive (browse-url-interactive-arg "URL: "))
    ;; URL encode any `confusing' characters in the URL.  This needs to
!   ;; include at least commas; presumably also close parens and dollars.
!   (while (string-match "[,)$]" url)
      (setq url (replace-match
  	       (format "%%%x" (string-to-char (match-string 0 url))) t t url)))
    (let* ((process-environment (browse-url-process-environment))
***************
*** 889,896 ****
  used instead of `browse-url-new-window-flag'."
    (interactive (browse-url-interactive-arg "URL: "))
    ;; URL encode any `confusing' characters in the URL.  This needs to
!   ;; include at least commas; presumably also close parens.
!   (while (string-match "[,)]" url)
      (setq url (replace-match
  	       (format "%%%x" (string-to-char (match-string 0 url))) t t url)))
    (let* ((process-environment (browse-url-process-environment))
--- 889,896 ----
  used instead of `browse-url-new-window-flag'."
    (interactive (browse-url-interactive-arg "URL: "))
    ;; URL encode any `confusing' characters in the URL.  This needs to
!   ;; include at least commas; presumably also close parens and dollars.
!   (while (string-match "[,)$]" url)
      (setq url (replace-match
  	       (format "%%%x" (string-to-char (match-string 0 url))) t t url)))
    (let* ((process-environment (browse-url-process-environment))
***************
*** 942,949 ****
  used instead of `browse-url-new-window-flag'."
    (interactive (browse-url-interactive-arg "URL: "))
    ;; URL encode any `confusing' characters in the URL.  This needs to
!   ;; include at least commas; presumably also close parens.
!   (while (string-match "[,)]" url)
      (setq url (replace-match
  	       (format "%%%x" (string-to-char (match-string 0 url))) t t url)))
    (let* ((process-environment (browse-url-process-environment))
--- 942,949 ----
  used instead of `browse-url-new-window-flag'."
    (interactive (browse-url-interactive-arg "URL: "))
    ;; URL encode any `confusing' characters in the URL.  This needs to
!   ;; include at least commas; presumably also close parens and dollars.
!   (while (string-match "[,)$]" url)
      (setq url (replace-match
  	       (format "%%%x" (string-to-char (match-string 0 url))) t t url)))
    (let* ((process-environment (browse-url-process-environment))
***************
*** 991,998 ****
  used instead of `browse-url-new-window-flag'."
    (interactive (browse-url-interactive-arg "URL: "))
    ;; URL encode any `confusing' characters in the URL.  This needs to
!   ;; include at least commas; presumably also close parens.
!   (while (string-match "[,)]" url)
      (setq url (replace-match
  	       (format "%%%x" (string-to-char (match-string 0 url))) t t url)))
    (let* ((process-environment (browse-url-process-environment))
--- 991,998 ----
  used instead of `browse-url-new-window-flag'."
    (interactive (browse-url-interactive-arg "URL: "))
    ;; URL encode any `confusing' characters in the URL.  This needs to
!   ;; include at least commas; presumably also close parens and dollars.
!   (while (string-match "[,)$]" url)
      (setq url (replace-match
  	       (format "%%%x" (string-to-char (match-string 0 url))) t t url)))
    (let* ((process-environment (browse-url-process-environment))

-- 
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: browse-url does not allow url with a dollar sign
       [not found]   ` <87r7wbigo9.fsf@mail.jurta.org>
@ 2004-03-02 12:32     ` Harald Maier
  0 siblings, 0 replies; 4+ messages in thread
From: Harald Maier @ 2004-03-02 12:32 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Juri Linkov <juri@jurta.org> writes:

>
> Could you confirm that the following patch fixes your problem?
>

Sorry, I was some days not in my office and at my desk. I tried your
patch just now and it works very well. Thanks for fixing that.

Harald

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-02 12:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-26 10:14 browse-url does not allow url with a dollar sign Harald Maier
2004-02-27  2:11 ` Juri Linkov
     [not found]   ` <87r7wbigo9.fsf@mail.jurta.org>
2004-03-02 12:32     ` Harald Maier
     [not found] <mailman.559.1077790489.340.bug-gnu-emacs@gnu.org>
2004-02-26 17:59 ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.