emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0046f2c: Tweak eww DWIM URL recognition


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 0046f2c: Tweak eww DWIM URL recognition
Date: Sat, 10 Jan 2015 15:01:56 +0000

branch: master
commit 0046f2c1580d439351fbecf2c28526a5e1c845ec
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>

    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.
---
 lisp/ChangeLog  |    5 +++++
 lisp/net/eww.el |    9 +++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fc7f5e5..808be4b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-10  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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 2ce95d9..52c1501 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'."
         ((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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]