* lisp/international/textsec.el (textsec-link-suspicious-p): Check
whether the domain in the link text is suspicious.
(url-domsuf-cookie-allowed-p tdomain)))))
(throw 'found
(format "Text `%s' doesn't point to link URL `%s'"
- text url)))))))))
+ text url)))
+ ((and tdomain
+ (textsec-domain-suspicious-p tdomain))
+ (throw 'found
+ (format "Domain `%s' in the link text is suspicious"
+ (bidi-string-strip-control-characters
+ tdomain))))))))))
(provide 'textsec)
(cons "https://www.gnu.org/"
"This is a link that doesn't point to fsf.org")))
- )
+ (should (textsec-link-suspicious-p
+ (cons "https://www.gn\N{LEFT-TO-RIGHT ISOLATE}u.org/"
+ "gn\N{LEFT-TO-RIGHT ISOLATE}u.org"))))
;;; textsec-tests.el ends here