From: Juri Linkov Date: Tue, 2 Mar 2004 14:55:32 +0000 (+0000) Subject: (browse-url-netscape, browse-url-mozilla, browse-url-galeon, X-Git-Tag: ttn-vms-21-2-B4~7383 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=26f7657a37847fff9ff6f6e695980c0eea4c43d4;p=emacs.git (browse-url-netscape, browse-url-mozilla, browse-url-galeon, browse-url-epiphany): Encode dollar signs in URL to prevent their substitution with the environment variable values by browsers. --- diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 5a25801458e..d590e8bb2a4 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -818,8 +818,8 @@ When called non-interactively, optional second argument NEW-WINDOW is 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) + ;; 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,8 +889,8 @@ When called non-interactively, optional second argument NEW-WINDOW is 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) + ;; 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,8 +942,8 @@ When called non-interactively, optional second argument NEW-WINDOW is 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) + ;; 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,8 +991,8 @@ When called non-interactively, optional second argument NEW-WINDOW is 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) + ;; 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))