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:
parent
afaa7c183b
commit
fd6b7e5807
2 changed files with 12 additions and 1 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue