1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(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.
This commit is contained in:
Ivan Shmakov 2015-01-10 17:48:38 +01:00 committed by Lars Magne Ingebrigtsen
parent afaa7c183b
commit fd6b7e5807
2 changed files with 12 additions and 1 deletions

View file

@ -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)))