From: Lars Ingebrigtsen Date: Wed, 19 Jan 2022 15:39:13 +0000 (+0100) Subject: Fix thinko in textsec-url-suspicious-p X-Git-Tag: emacs-29.0.90~2938 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1e5e85f3ce2439d26ad6f089e149cbf66b4dccc5;p=emacs.git Fix thinko in textsec-url-suspicious-p * lisp/international/textsec.el (textsec-url-suspicious-p): Don't bug out on non-HTTP URLs. --- diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el index 90c37bf2b3b..4e9fb10ad77 100644 --- a/lisp/international/textsec.el +++ b/lisp/international/textsec.el @@ -372,7 +372,9 @@ and `textsec-name-suspicious-p'." If it isn't, return nil. If it is, return a string explaining the potential problem." (let ((parsed (url-generic-parse-url url))) - (textsec-domain-suspicious-p (url-host parsed)))) + ;; The URL may not have a domain. + (and (url-host parsed) + (textsec-domain-suspicious-p (url-host parsed))))) (provide 'textsec)