diff options
| -rw-r--r-- | lisp/net/browse-url.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 98b0acfc0c6..a84a7b1c716 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -878,7 +878,21 @@ The optional NEW-WINDOW argument is not used." | |||
| 878 | (error "Browsing URLs is not supported on this system"))) | 878 | (error "Browsing URLs is not supported on this system"))) |
| 879 | ((eq system-type 'cygwin) | 879 | ((eq system-type 'cygwin) |
| 880 | (call-process "cygstart" nil nil nil url)) | 880 | (call-process "cygstart" nil nil nil url)) |
| 881 | (t (w32-shell-execute "open" (url-unhex-string url))))) | 881 | (t |
| 882 | (w32-shell-execute "open" | ||
| 883 | ;; w32-shell-execute passes file:// URLs | ||
| 884 | ;; to APIs that expect file names, so we | ||
| 885 | ;; need to unhex any %nn encoded | ||
| 886 | ;; characters in the URL. We don't do | ||
| 887 | ;; that for other URLs; in particular, | ||
| 888 | ;; default Windows mail client barfs on | ||
| 889 | ;; quotes in the MAILTO URLs, so we prefer | ||
| 890 | ;; to leave the URL with its embedded %nn | ||
| 891 | ;; encoding intact. | ||
| 892 | (if (eq t (compare-strings url nil 7 | ||
| 893 | "file://" nil nil)) | ||
| 894 | (url-unhex-string url) | ||
| 895 | url))))) | ||
| 882 | 896 | ||
| 883 | (defun browse-url-default-macosx-browser (url &optional _new-window) | 897 | (defun browse-url-default-macosx-browser (url &optional _new-window) |
| 884 | "Invoke the macOS system's default Web browser. | 898 | "Invoke the macOS system's default Web browser. |