aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Oteiza2017-09-03 20:42:01 -0400
committerMark Oteiza2017-09-03 20:42:01 -0400
commit132f4472f5f066948e69894bac8ff27430e82012 (patch)
treeab771b9d320e828cc341956cb9b960e076255ec3
parent48116f91267cb35cdde0a1558c7cee47b6e3ff53 (diff)
downloademacs-132f4472f5f066948e69894bac8ff27430e82012.tar.gz
emacs-132f4472f5f066948e69894bac8ff27430e82012.zip
Hexify strings in EWW search queries
Previously, inputting "cats & dogs" would lose dogs because the ampersand signifies a query parameter. Instead, hexify each word while preserving quotes with split-string. * lisp/net/eww.el (eww--dwim-expand-url): Join hexified words together with + separators, instead of replacing whitespace with +.
-rw-r--r--lisp/net/eww.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 2fc36e180ee..03d9172b655 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -297,7 +297,8 @@ word(s) will be searched for via `eww-search-prefix'."
297 (when (string= (url-filename (url-generic-parse-url url)) "") 297 (when (string= (url-filename (url-generic-parse-url url)) "")
298 (setq url (concat url "/")))) 298 (setq url (concat url "/"))))
299 (setq url (concat eww-search-prefix 299 (setq url (concat eww-search-prefix
300 (replace-regexp-in-string " " "+" url)))))) 300 (mapconcat
301 #'url-hexify-string (split-string url) "+"))))))
301 url) 302 url)
302 303
303;;;###autoload (defalias 'browse-web 'eww) 304;;;###autoload (defalias 'browse-web 'eww)