emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master fd6b7e5: (shr-urlify): Decode URLs before using the


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master fd6b7e5: (shr-urlify): Decode URLs before using them as titles
Date: Sat, 10 Jan 2015 16:49:10 +0000

branch: master
commit fd6b7e5807c521b011896d3a62c02330d8c9d3d4
Author: Ivan Shmakov <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>

    (shr-urlify): Decode URLs before using them as titles
    
    Fixes: debbugs:19555
    
    * lisp/net/shr.el (shr-urlify): Decode URLs before using them as titles.
---
 lisp/ChangeLog  |    5 +++++
 lisp/net/shr.el |    8 +++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6c67f4e..5bebd09 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-10  Ivan Shmakov  <address@hidden>
+
+       * net/shr.el (shr-urlify): Decode URLs before using them as titles
+       (bug#19555).
+
 2015-01-10  Lars Magne Ingebrigtsen  <address@hidden>
 
        * net/eww.el (eww): Always interpret URLs that start with https?:
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index ed824cf..a2bad81 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -894,7 +894,13 @@ START, and END.  Note that START and END should be 
markers."
   (add-text-properties
    start (point)
    (list 'shr-url url
-        'help-echo (if title (shr-fold-text (format "%s (%s)" url title)) url)
+        'help-echo (let ((iri (or (with-demoted-errors
+                                      "shr-urlify: %s"
+                                    (decode-coding-string
+                                     (url-unhex-string url)
+                                     'utf-8 t))
+                                  url)))
+                     (if title (format "%s (%s)" iri title) iri))
         'follow-link t
         'mouse-face 'highlight
         'keymap shr-map)))



reply via email to

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