diff options
Diffstat (limited to 'lisp/net')
| -rw-r--r-- | lisp/net/eww.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 535992513a2..7b37eda185e 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -102,8 +102,12 @@ word(s) will be searched for via `eww-search-prefix'." | |||
| 102 | (interactive "sEnter URL or keywords: ") | 102 | (interactive "sEnter URL or keywords: ") |
| 103 | (if (and (= (length (split-string url)) 1) | 103 | (if (and (= (length (split-string url)) 1) |
| 104 | (> (length (split-string url "\\.")) 1)) | 104 | (> (length (split-string url "\\.")) 1)) |
| 105 | (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url) | 105 | (progn |
| 106 | (setq url (concat "http://" url))) | 106 | (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url) |
| 107 | (setq url (concat "http://" url))) | ||
| 108 | ;; some site don't redirect final / | ||
| 109 | (when (string= (url-filename (url-generic-parse-url url)) "") | ||
| 110 | (setq url (concat url "/")))) | ||
| 107 | (unless (string-match-p "^file:" url) | 111 | (unless (string-match-p "^file:" url) |
| 108 | (setq url (concat eww-search-prefix | 112 | (setq url (concat eww-search-prefix |
| 109 | (replace-regexp-in-string " " "+" url))))) | 113 | (replace-regexp-in-string " " "+" url))))) |