diff options
| author | Ivan Kanis | 2013-06-24 19:38:51 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2013-06-24 19:38:51 +0200 |
| commit | 71d4c19d3d50b7be97b3eb00b4d7b37715f89935 (patch) | |
| tree | ad99f4eaed01afa9962f8468a8dcc41841adb449 /lisp/net | |
| parent | ae36ca55cd1656c43a048946c1dd3efe599bafd5 (diff) | |
| download | emacs-71d4c19d3d50b7be97b3eb00b4d7b37715f89935.tar.gz emacs-71d4c19d3d50b7be97b3eb00b4d7b37715f89935.zip | |
* net/eww.el (eww): Add a trailing slash to domain names.
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))))) |