Commit 0046f2c1 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

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.
parent 485763c0
2015-01-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/eww.el (eww): Always interpret URLs that start with https?:
as plain URLs, even if they have spaces in them (bug#19556).
2015-01-10 Daniel Colascione <dancol@dancol.org>
* vc/vc-hooks.el (vc-prefix-map): Bind vc-delete-file to C-x v x,
......
......@@ -255,10 +255,11 @@ word(s) will be searched for via `eww-search-prefix'."
((string-match-p "\\`ftp://" url)
(user-error "FTP is not supported."))
(t
(if (and (= (length (split-string url)) 1)
(or (and (not (string-match-p "\\`[\"\'].*[\"\']\\'" url))
(> (length (split-string url "[.:]")) 1))
(string-match eww-local-regex url)))
(if (or (string-match "\\`https?:" url)
(and (= (length (split-string url)) 1)
(or (and (not (string-match-p "\\`[\"\'].*[\"\']\\'" url))
(> (length (split-string url "[.:]")) 1))
(string-match eww-local-regex url))))
(progn
(unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
(setq url (concat "http://" url)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment