aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net/shr.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/shr.el')
-rw-r--r--lisp/net/shr.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 7363874cf3c..ff14acfda70 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1467,7 +1467,18 @@ ones, in case fg and bg are nil."
1467 (dom-attr dom 'name)))) ; Obsolete since HTML5. 1467 (dom-attr dom 'name)))) ; Obsolete since HTML5.
1468 (push (cons id (point)) shr--link-targets)) 1468 (push (cons id (point)) shr--link-targets))
1469 (when url 1469 (when url
1470 (shr-urlify (or shr-start start) (shr-expand-url url) title)))) 1470 (shr-urlify (or shr-start start) (shr-expand-url url) title)
1471 ;; Check whether the URL is suspicious.
1472 (when-let ((warning (or (textsec-suspicious-p
1473 (shr-expand-url url) 'url)
1474 (textsec-suspicious-p
1475 (cons (shr-expand-url url)
1476 (buffer-substring (or shr-start start)
1477 (point)))
1478 'link))))
1479 (add-text-properties (or shr-start start) (point)
1480 (list 'face '(shr-link textsec-suspicious)))
1481 (insert (propertize "⚠️" 'help-echo warning))))))
1471 1482
1472(defun shr-tag-abbr (dom) 1483(defun shr-tag-abbr (dom)
1473 (let ((title (dom-attr dom 'title)) 1484 (let ((title (dom-attr dom 'title))