Subject: Bug (Trunk): Redirect fails in Duckduckgo

From: Ian Dunn <[email-masked]>
Date: Sat, 14 Jan 2017 00:34:24 -0500

Due I believe to a change in Duckduckgo's API, eww is no longer able to work with Duckduckgo.  It appears that they are using a referrer tag with single quotes rather than double quotes.  The attached patch fixes this.

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index d42180719d..b051c1ac85 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -501,6 +501,7 @@ Currently this means either text/html or application/xhtml+xml."
              (< eww-redirect-level 5))
     (when-let (refresh (dom-attr dom 'content))
       (when (or (string-match "^\\([0-9]+\\) *;.*url=\"\\([^\"]+\\)\"" refresh)
+                (string-match "^\\([0-9]+\\) *;.*url='\\([^ ]+\\)'" refresh)
                 (string-match "^\\([0-9]+\\) *;.*url=\\([^ ]+\\)" refresh))
         (let ((timeout (match-string 1 refresh))
               (url (match-string 2 refresh))

--
Ian Dunn