diff options
| author | Juri Linkov | 2004-03-02 14:55:32 +0000 |
|---|---|---|
| committer | Juri Linkov | 2004-03-02 14:55:32 +0000 |
| commit | 26f7657a37847fff9ff6f6e695980c0eea4c43d4 (patch) | |
| tree | da540fea033365b97bc21a5d1824f3eae9f17e60 | |
| parent | 851e55621f5532e3b34791e8cc204d833b06611d (diff) | |
| download | emacs-26f7657a37847fff9ff6f6e695980c0eea4c43d4.tar.gz emacs-26f7657a37847fff9ff6f6e695980c0eea4c43d4.zip | |
(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.
| -rw-r--r-- | lisp/net/browse-url.el | 16 |
1 files changed, 8 insertions, 8 deletions
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 | |||
| 818 | used instead of `browse-url-new-window-flag'." | 818 | used instead of `browse-url-new-window-flag'." |
| 819 | (interactive (browse-url-interactive-arg "URL: ")) | 819 | (interactive (browse-url-interactive-arg "URL: ")) |
| 820 | ;; URL encode any `confusing' characters in the URL. This needs to | 820 | ;; URL encode any `confusing' characters in the URL. This needs to |
| 821 | ;; include at least commas; presumably also close parens. | 821 | ;; include at least commas; presumably also close parens and dollars. |
| 822 | (while (string-match "[,)]" url) | 822 | (while (string-match "[,)$]" url) |
| 823 | (setq url (replace-match | 823 | (setq url (replace-match |
| 824 | (format "%%%x" (string-to-char (match-string 0 url))) t t url))) | 824 | (format "%%%x" (string-to-char (match-string 0 url))) t t url))) |
| 825 | (let* ((process-environment (browse-url-process-environment)) | 825 | (let* ((process-environment (browse-url-process-environment)) |
| @@ -889,8 +889,8 @@ When called non-interactively, optional second argument NEW-WINDOW is | |||
| 889 | used instead of `browse-url-new-window-flag'." | 889 | used instead of `browse-url-new-window-flag'." |
| 890 | (interactive (browse-url-interactive-arg "URL: ")) | 890 | (interactive (browse-url-interactive-arg "URL: ")) |
| 891 | ;; URL encode any `confusing' characters in the URL. This needs to | 891 | ;; URL encode any `confusing' characters in the URL. This needs to |
| 892 | ;; include at least commas; presumably also close parens. | 892 | ;; include at least commas; presumably also close parens and dollars. |
| 893 | (while (string-match "[,)]" url) | 893 | (while (string-match "[,)$]" url) |
| 894 | (setq url (replace-match | 894 | (setq url (replace-match |
| 895 | (format "%%%x" (string-to-char (match-string 0 url))) t t url))) | 895 | (format "%%%x" (string-to-char (match-string 0 url))) t t url))) |
| 896 | (let* ((process-environment (browse-url-process-environment)) | 896 | (let* ((process-environment (browse-url-process-environment)) |
| @@ -942,8 +942,8 @@ When called non-interactively, optional second argument NEW-WINDOW is | |||
| 942 | used instead of `browse-url-new-window-flag'." | 942 | used instead of `browse-url-new-window-flag'." |
| 943 | (interactive (browse-url-interactive-arg "URL: ")) | 943 | (interactive (browse-url-interactive-arg "URL: ")) |
| 944 | ;; URL encode any `confusing' characters in the URL. This needs to | 944 | ;; URL encode any `confusing' characters in the URL. This needs to |
| 945 | ;; include at least commas; presumably also close parens. | 945 | ;; include at least commas; presumably also close parens and dollars. |
| 946 | (while (string-match "[,)]" url) | 946 | (while (string-match "[,)$]" url) |
| 947 | (setq url (replace-match | 947 | (setq url (replace-match |
| 948 | (format "%%%x" (string-to-char (match-string 0 url))) t t url))) | 948 | (format "%%%x" (string-to-char (match-string 0 url))) t t url))) |
| 949 | (let* ((process-environment (browse-url-process-environment)) | 949 | (let* ((process-environment (browse-url-process-environment)) |
| @@ -991,8 +991,8 @@ When called non-interactively, optional second argument NEW-WINDOW is | |||
| 991 | used instead of `browse-url-new-window-flag'." | 991 | used instead of `browse-url-new-window-flag'." |
| 992 | (interactive (browse-url-interactive-arg "URL: ")) | 992 | (interactive (browse-url-interactive-arg "URL: ")) |
| 993 | ;; URL encode any `confusing' characters in the URL. This needs to | 993 | ;; URL encode any `confusing' characters in the URL. This needs to |
| 994 | ;; include at least commas; presumably also close parens. | 994 | ;; include at least commas; presumably also close parens and dollars. |
| 995 | (while (string-match "[,)]" url) | 995 | (while (string-match "[,)$]" url) |
| 996 | (setq url (replace-match | 996 | (setq url (replace-match |
| 997 | (format "%%%x" (string-to-char (match-string 0 url))) t t url))) | 997 | (format "%%%x" (string-to-char (match-string 0 url))) t t url))) |
| 998 | (let* ((process-environment (browse-url-process-environment)) | 998 | (let* ((process-environment (browse-url-process-environment)) |