From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: Re: browse-url does not allow url with a dollar sign Date: Fri, 27 Feb 2004 04:11:52 +0200 Organization: JURTA Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87n075p8yg.fsf@mail.jurta.org> References: <20040226101410.805BE1337C@ate.maierh> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077848447 14154 80.91.224.253 (27 Feb 2004 02:20:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Feb 2004 02:20:47 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 27 03:20:41 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AwXcH-0002HB-00 for ; Fri, 27 Feb 2004 03:20:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AwXcI-0002ma-2e for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Feb 2004 21:20:42 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AwXcE-0002jK-Ap for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2004 21:20:38 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AwXbZ-00028Q-C2 for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2004 21:20:29 -0500 Original-Received: from [66.33.219.4] (helo=spork.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AwXbY-00027H-SW for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2004 21:19:56 -0500 Original-Received: from mail.jurta.org (80-235-41-73-dsl.mus.estpak.ee [80.235.41.73]) by spork.dreamhost.com (Postfix) with ESMTP id B813411DC69; Thu, 26 Feb 2004 18:19:49 -0800 (PST) Original-To: Harald Maier In-Reply-To: <20040226101410.805BE1337C@ate.maierh> (Harald Maier's message of "Thu, 26 Feb 2004 11:14:10 +0100 (CET)") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:7110 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:7110 Harald Maier 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/