diff options
| author | Lars Magne Ingebrigtsen | 2014-08-25 17:59:38 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2014-08-25 17:59:38 +0200 |
| commit | 0a4aa6bd207fd76f715e9562529d9fbec80ecd4e (patch) | |
| tree | ab2d77c41140f80a0eae5cd7e4ea99d24f7ceef2 | |
| parent | 015ea0ffdb4f446e3bd263fe5e42b35aafdf1e5b (diff) | |
| download | emacs-0a4aa6bd207fd76f715e9562529d9fbec80ecd4e.tar.gz emacs-0a4aa6bd207fd76f715e9562529d9fbec80ecd4e.zip | |
shr.el: Encode copied URLs
* net/shr.el (shr-copy-url): Encode copied URL to avoid getting
URLs containing spaces and the like.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/shr.el | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7588427dd83..65a59f4da6d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-08-25 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * net/shr.el (shr-copy-url): Encode copied URL to avoid getting | ||
| 4 | URLs containing spaces and the like. | ||
| 5 | |||
| 1 | 2014-08-25 Christoph Scholtes <cschol2112@gmail.com> | 6 | 2014-08-25 Christoph Scholtes <cschol2112@gmail.com> |
| 2 | 7 | ||
| 3 | * subr.el (remq): Fix docstring (Bug#18253). | 8 | * subr.el (remq): Fix docstring (Bug#18253). |
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 5e2e1eadf86..dae72b682b0 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -246,9 +246,9 @@ redirects somewhere else." | |||
| 246 | ;; Copy the URL to the kill ring. | 246 | ;; Copy the URL to the kill ring. |
| 247 | (t | 247 | (t |
| 248 | (with-temp-buffer | 248 | (with-temp-buffer |
| 249 | (insert url) | 249 | (insert (url-encode-url url)) |
| 250 | (copy-region-as-kill (point-min) (point-max)) | 250 | (copy-region-as-kill (point-min) (point-max)) |
| 251 | (message "Copied %s" url)))))) | 251 | (message "Copied %s" (buffer-substring))))))) |
| 252 | 252 | ||
| 253 | (defun shr-next-link () | 253 | (defun shr-next-link () |
| 254 | "Skip to the next link." | 254 | "Skip to the next link." |