eww: don't add keymap to <a> without href

* lisp/net/eww.el (eww-tag-a): Only add keymap if the href
attribute is present.  (Bug#44147)
This commit is contained in:
Andreas Schwab 2020-10-22 20:07:24 +02:00
parent f6d1389796
commit b572308fbf

View file

@ -695,11 +695,12 @@ Currently this means either text/html or application/xhtml+xml."
(eww-handle-link dom)
(let ((start (point)))
(shr-tag-a dom)
(put-text-property start (point)
'keymap
(if (mm-images-in-region-p start (point))
eww-image-link-keymap
eww-link-keymap))))
(if (dom-attr dom 'href)
(put-text-property start (point)
'keymap
(if (mm-images-in-region-p start (point))
eww-image-link-keymap
eww-link-keymap)))))
(defun eww--limit-string-pixelwise (string pixels)
(if (not pixels)