Tweak textsec-link-suspicious-p
* lisp/international/textsec.el (textsec-link-suspicious-p): Don't mark dates as suspicious.
This commit is contained in:
parent
ea0060abfb
commit
37e2304f98
1 changed files with 7 additions and 3 deletions
|
@ -398,9 +398,13 @@ when the link text looks like an URL itself, but doesn't lead to
|
|||
the same domain as the URL."
|
||||
(let* ((url (car link))
|
||||
(text (string-trim (cdr link)))
|
||||
(text-bits (seq-filter (lambda (bit)
|
||||
(string-match-p "\\`[^.]+\\.[^.]+.*\\'" bit))
|
||||
(split-string text))))
|
||||
(text-bits (seq-filter
|
||||
(lambda (bit)
|
||||
(and (string-match-p "\\`[^.]+\\.[^.]+.*\\'" bit)
|
||||
;; All-numerical texts are probably not
|
||||
;; suspicious (but what about IP addresses?).
|
||||
(not (string-match-p "\\`[0-9.]+\\'" bit))))
|
||||
(split-string text))))
|
||||
(when text-bits
|
||||
(setq text-bits (seq-map (lambda (string)
|
||||
(if (not (string-match-p "\\`[^:]+:" string))
|
||||
|
|
Loading…
Add table
Reference in a new issue