From: Mark Oteiza Date: Mon, 4 Sep 2017 00:42:01 +0000 (-0400) Subject: Hexify strings in EWW search queries X-Git-Tag: emacs-26.0.90~263 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=132f4472f5f066948e69894bac8ff27430e82012;p=emacs.git 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 +. --- 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'." (when (string= (url-filename (url-generic-parse-url url)) "") (setq url (concat url "/")))) (setq url (concat eww-search-prefix - (replace-regexp-in-string " " "+" url)))))) + (mapconcat + #'url-hexify-string (split-string url) "+")))))) url) ;;;###autoload (defalias 'browse-web 'eww)