From: Lars Magne Ingebrigtsen Date: Mon, 25 Aug 2014 15:59:38 +0000 (+0200) Subject: shr.el: Encode copied URLs X-Git-Tag: emacs-25.0.90~2635^2~679^2~435 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0a4aa6bd207fd76f715e9562529d9fbec80ecd4e;p=emacs.git shr.el: Encode copied URLs * net/shr.el (shr-copy-url): Encode copied URL to avoid getting URLs containing spaces and the like. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7588427dd83..65a59f4da6d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-08-25 Lars Magne Ingebrigtsen + + * net/shr.el (shr-copy-url): Encode copied URL to avoid getting + URLs containing spaces and the like. + 2014-08-25 Christoph Scholtes * 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." ;; Copy the URL to the kill ring. (t (with-temp-buffer - (insert url) + (insert (url-encode-url url)) (copy-region-as-kill (point-min) (point-max)) - (message "Copied %s" url)))))) + (message "Copied %s" (buffer-substring))))))) (defun shr-next-link () "Skip to the next link."