aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love1998-06-19 16:01:08 +0000
committerDave Love1998-06-19 16:01:08 +0000
commit9d843bef01373c831809fb3b773d1ddd6d008cf1 (patch)
tree9630a05f9ee03cd8183100922618bfba7a2635f8
parente3a10b5e595a84821b3440c484c840b541ba669f (diff)
downloademacs-9d843bef01373c831809fb3b773d1ddd6d008cf1.tar.gz
emacs-9d843bef01373c831809fb3b773d1ddd6d008cf1.zip
(browse-url-netscape): Encode `)' too.
-rw-r--r--lisp/browse-url.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/browse-url.el b/lisp/browse-url.el
index 00c15fb1cd9..6521dfdef29 100644
--- a/lisp/browse-url.el
+++ b/lisp/browse-url.el
@@ -46,10 +46,14 @@
46;; browse-url-mmm MMM ? 46;; browse-url-mmm MMM ?
47;; browse-url-generic arbitrary 47;; browse-url-generic arbitrary
48 48
49;; [The Netscape browser is now free software
50;; <URL:http://www.mozilla.org/>, albeit not GPLed, so it is
51;; reasonable to keep it as the default.]
52
49;; Note that versions of Netscape before 1.1b1 did not have remote 53;; Note that versions of Netscape before 1.1b1 did not have remote
50;; control. <URL:http://www.netscape.com/newsref/std/x-remote.html>. 54;; control. <URL:http://www.netscape.com/newsref/std/x-remote.html>.
51 55
52;; Netscape can cache Web pages so it may be necessary to tell it to 56;; Browsers can cache Web pages so it may be necessary to tell them to
53;; reload the current page if it has changed (e.g. if you have edited 57;; reload the current page if it has changed (e.g. if you have edited
54;; it). There is currently no perfect automatic solution to this. 58;; it). There is currently no perfect automatic solution to this.
55 59
@@ -98,9 +102,9 @@
98;; support for Java applets and multicast) can be used like Mosaic by 102;; support for Java applets and multicast) can be used like Mosaic by
99;; setting `browse-url-mosaic-program' appropriately. 103;; setting `browse-url-mosaic-program' appropriately.
100 104
101;; I [Denis Howe] recommend Nelson Minar <nelson@santafe.edu>'s excellent 105;; I [Denis Howe, not Dave Love] recommend Nelson Minar
102;; html-helper-mode.el for editing HTML and thank Nelson for 106;; <nelson@santafe.edu>'s excellent html-helper-mode.el for editing
103;; his many useful comments on this code. 107;; HTML and thank Nelson for his many useful comments on this code.
104;; <URL:http://www.santafe.edu/%7Enelson/hhm-beta/> 108;; <URL:http://www.santafe.edu/%7Enelson/hhm-beta/>
105 109
106;; See also hm--html-menus <URL:http://www.tnt.uni-hannover.de/%7Emuenkel/ 110;; See also hm--html-menus <URL:http://www.tnt.uni-hannover.de/%7Emuenkel/
@@ -692,9 +696,11 @@ the effect of `browse-url-new-window-p'.
692When called non-interactively, optional second argument NEW-WINDOW is 696When called non-interactively, optional second argument NEW-WINDOW is
693used instead of `browse-url-new-window-p'." 697used instead of `browse-url-new-window-p'."
694 (interactive (browse-url-interactive-arg "Netscape URL: ")) 698 (interactive (browse-url-interactive-arg "Netscape URL: "))
695 ;; URL encode any commas in the URL 699 ;; URL encode any `confusing' characters in the URL. This needs to
696 (while (string-match "," url) 700 ;; include at least commas; presumably also close parens.
697 (setq url (replace-match "%2C" t t url))) 701 (while (string-match "[,)]" url)
702 (setq url (replace-match
703 (format "%x" (string-to-char (match-string 0 url))) t t url)))
698 (let* ((process-environment (browse-url-process-environment)) 704 (let* ((process-environment (browse-url-process-environment))
699 (process (apply 'start-process 705 (process (apply 'start-process
700 (concat "netscape " url) nil 706 (concat "netscape " url) nil