[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 91de88b: Fix report-emacs-bug via mailclient on M
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 91de88b: Fix report-emacs-bug via mailclient on MS-Windows |
Date: |
Thu, 3 May 2018 14:05:15 -0400 (EDT) |
branch: emacs-26
commit 91de88bfeb759fb36ca12ee829b6d0c6e84fa4ce
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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)
---
lisp/net/browse-url.el | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 98b0acf..a84a7b1 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."
(error "Browsing URLs is not supported on this system")))
((eq system-type 'cygwin)
(call-process "cygstart" nil nil nil url))
- (t (w32-shell-execute "open" (url-unhex-string url)))))
+ (t
+ (w32-shell-execute "open"
+ ;; w32-shell-execute passes file:// URLs
+ ;; to APIs that expect file names, so we
+ ;; need to unhex any %nn encoded
+ ;; characters in the URL. We don't do
+ ;; that for other URLs; in particular,
+ ;; default Windows mail client barfs on
+ ;; quotes in the MAILTO URLs, so we prefer
+ ;; to leave the URL with its embedded %nn
+ ;; encoding intact.
+ (if (eq t (compare-strings url nil 7
+ "file://" nil nil))
+ (url-unhex-string url)
+ url)))))
(defun browse-url-default-macosx-browser (url &optional _new-window)
"Invoke the macOS system's default Web browser.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 91de88b: Fix report-emacs-bug via mailclient on MS-Windows,
Eli Zaretskii <=