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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user