]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix interaction between url-handler-mode and browse-url
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 23 Aug 2019 04:00:36 +0000 (06:00 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 23 Aug 2019 04:00:36 +0000 (06:00 +0200)
* lisp/net/browse-url.el (browse-url): Don't expand any URLs (like
"man:") that have a scheme when using `url-handler-mode' (bug#37056).

lisp/net/browse-url.el

index 3151dae0aa2173ed4146ca1d11c8fe6d358515bf..87a8248854f4bf5fd780c6906cd34a6dc3930fb3 100644 (file)
@@ -781,7 +781,9 @@ as ARGS."
   (interactive (browse-url-interactive-arg "URL: "))
   (unless (called-interactively-p 'interactive)
     (setq args (or args (list browse-url-new-window-flag))))
-  (when (and url-handler-mode (not (file-name-absolute-p url)))
+  (when (and url-handler-mode
+             (not (file-name-absolute-p url))
+             (not (string-match "\\`[a-z]+:" url)))
     (setq url (expand-file-name url)))
   (let ((process-environment (copy-sequence process-environment))
        (function (or (and (string-match "\\`mailto:" url)