emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117736: shr.el: Encode copied URLs


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] trunk r117736: shr.el: Encode copied URLs
Date: Mon, 25 Aug 2014 15:59:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117736
revision-id: address@hidden
parent: address@hidden
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Mon 2014-08-25 17:59:38 +0200
message:
  shr.el: Encode copied URLs
  
  * net/shr.el (shr-copy-url): Encode copied URL to avoid getting
  URLs containing spaces and the like.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/shr.el                shr.el-20101002102929-yfzewk55rsg0mn93-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-08-25 03:16:36 +0000
+++ b/lisp/ChangeLog    2014-08-25 15:59:38 +0000
@@ -1,3 +1,8 @@
+2014-08-25  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * net/shr.el (shr-copy-url): Encode copied URL to avoid getting
+       URLs containing spaces and the like.
+
 2014-08-25  Christoph Scholtes  <address@hidden>
 
        * subr.el (remq): Fix docstring (Bug#18253).

=== modified file 'lisp/net/shr.el'
--- a/lisp/net/shr.el   2014-08-05 18:15:03 +0000
+++ b/lisp/net/shr.el   2014-08-25 15:59:38 +0000
@@ -246,9 +246,9 @@
      ;; 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."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]