aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-05-03 21:04:17 +0300
committerEli Zaretskii2018-05-03 21:04:17 +0300
commit91de88bfeb759fb36ca12ee829b6d0c6e84fa4ce (patch)
treefb4fe51bec8bf281dc78d35066a8247c8f5b3809
parentf4b5ff20a663db483ee4bb3e60c34ce4cd2d6d70 (diff)
downloademacs-91de88bfeb759fb36ca12ee829b6d0c6e84fa4ce.tar.gz
emacs-91de88bfeb759fb36ca12ee829b6d0c6e84fa4ce.zip
Fix report-emacs-bug via mailclient on MS-Windows
* lisp/net/browse-url.el (browse-url-default-windows-browser): On MS-Windows, call url-unhex-string only for file:// URLs. (Bug#31351)
-rw-r--r--lisp/net/browse-url.el16
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.