From: Andreas Schwab Date: Thu, 22 Oct 2020 18:07:24 +0000 (+0200) Subject: eww: don't add keymap to without href X-Git-Tag: emacs-28.0.90~5478 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b572308fbf095da3bd7382d3b1c8f952a51ce3ac;p=emacs.git eww: don't add keymap to without href * lisp/net/eww.el (eww-tag-a): Only add keymap if the href attribute is present. (Bug#44147) --- diff --git a/lisp/net/eww.el b/lisp/net/eww.el index fd9fe98439d..53835bb5440 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -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)