diff options
| author | Andreas Schwab | 2020-10-22 20:07:24 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2020-10-22 20:13:24 +0200 |
| commit | b572308fbf095da3bd7382d3b1c8f952a51ce3ac (patch) | |
| tree | fb7fcdb3750bd56f34ba2d1fe3e9c6f3c0e1ec45 | |
| parent | f6d138979626951a035a6ecf90b77637b06ad6fc (diff) | |
| download | emacs-b572308fbf095da3bd7382d3b1c8f952a51ce3ac.tar.gz emacs-b572308fbf095da3bd7382d3b1c8f952a51ce3ac.zip | |
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)
| -rw-r--r-- | lisp/net/eww.el | 11 |
1 files changed, 6 insertions, 5 deletions
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." | |||
| 695 | (eww-handle-link dom) | 695 | (eww-handle-link dom) |
| 696 | (let ((start (point))) | 696 | (let ((start (point))) |
| 697 | (shr-tag-a dom) | 697 | (shr-tag-a dom) |
| 698 | (put-text-property start (point) | 698 | (if (dom-attr dom 'href) |
| 699 | 'keymap | 699 | (put-text-property start (point) |
| 700 | (if (mm-images-in-region-p start (point)) | 700 | 'keymap |
| 701 | eww-image-link-keymap | 701 | (if (mm-images-in-region-p start (point)) |
| 702 | eww-link-keymap)))) | 702 | eww-image-link-keymap |
| 703 | eww-link-keymap))))) | ||
| 703 | 704 | ||
| 704 | (defun eww--limit-string-pixelwise (string pixels) | 705 | (defun eww--limit-string-pixelwise (string pixels) |
| 705 | (if (not pixels) | 706 | (if (not pixels) |