aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2015-01-10 16:01:43 +0100
committerLars Magne Ingebrigtsen2015-01-10 16:01:43 +0100
commit0046f2c1580d439351fbecf2c28526a5e1c845ec (patch)
treef5f00e2be79e2990b3cfdd4858b6790e2af803e4
parent485763c0dcdc4f5ab1030f4bae6acbbe0ce9497e (diff)
downloademacs-0046f2c1580d439351fbecf2c28526a5e1c845ec.tar.gz
emacs-0046f2c1580d439351fbecf2c28526a5e1c845ec.zip
Tweak eww DWIM URL recognition
Fixes: debbugs:19556 * net/eww.el (eww): Always interpret URLs that start with https?: as plain URLs, even if they have spaces in them.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/eww.el9
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fc7f5e57cbd..808be4b6957 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12015-01-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * net/eww.el (eww): Always interpret URLs that start with https?:
4 as plain URLs, even if they have spaces in them (bug#19556).
5
12015-01-10 Daniel Colascione <dancol@dancol.org> 62015-01-10 Daniel Colascione <dancol@dancol.org>
2 7
3 * vc/vc-hooks.el (vc-prefix-map): Bind vc-delete-file to C-x v x, 8 * vc/vc-hooks.el (vc-prefix-map): Bind vc-delete-file to C-x v x,
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 2ce95d97ff8..52c1501fbe1 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -255,10 +255,11 @@ word(s) will be searched for via `eww-search-prefix'."
255 ((string-match-p "\\`ftp://" url) 255 ((string-match-p "\\`ftp://" url)
256 (user-error "FTP is not supported.")) 256 (user-error "FTP is not supported."))
257 (t 257 (t
258 (if (and (= (length (split-string url)) 1) 258 (if (or (string-match "\\`https?:" url)
259 (or (and (not (string-match-p "\\`[\"\'].*[\"\']\\'" url)) 259 (and (= (length (split-string url)) 1)
260 (> (length (split-string url "[.:]")) 1)) 260 (or (and (not (string-match-p "\\`[\"\'].*[\"\']\\'" url))
261 (string-match eww-local-regex url))) 261 (> (length (split-string url "[.:]")) 1))
262 (string-match eww-local-regex url))))
262 (progn 263 (progn
263 (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url) 264 (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
264 (setq url (concat "http://" url))) 265 (setq url (concat "http://" url)))