diff options
author | Mark Oteiza <mvoteiza@udel.edu> | 2017-09-03 20:42:01 -0400 |
---|---|---|
committer | Mark Oteiza <mvoteiza@udel.edu> | 2017-09-03 20:42:01 -0400 |
commit | 132f4472f5f066948e69894bac8ff27430e82012 (patch) | |
tree | ab771b9d320e828cc341956cb9b960e076255ec3 /lisp | |
parent | 48116f91267cb35cdde0a1558c7cee47b6e3ff53 (diff) | |
download | emacs-132f4472f5f066948e69894bac8ff27430e82012.tar.gz emacs-132f4472f5f066948e69894bac8ff27430e82012.tar.bz2 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 +.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/net/eww.el | 3 |
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'." (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) |