summaryrefslogtreecommitdiff
path: root/test/lisp/international
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-01-19 15:52:20 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-01-19 15:52:20 +0100
commit598038643f483eabe788d4910bea5d1518ee0015 (patch)
tree096114d9cca1804c240ba13ad4caee966c83125d /test/lisp/international
parent124c4ad1e5dbccb0789e96aff1c7f77957119201 (diff)
downloademacs-598038643f483eabe788d4910bea5d1518ee0015.tar.gz
emacs-598038643f483eabe788d4910bea5d1518ee0015.tar.bz2
emacs-598038643f483eabe788d4910bea5d1518ee0015.zip
Mark whole-script confusables as suspicious domains
* lisp/international/textsec.el (textsec-domain-suspicious-p): Consider domain names that are whole-script confusables with ASCII to be suspicious. (I think this is what the Unicode standard is recommending, but I'm not 100% sure.)
Diffstat (limited to 'test/lisp/international')
-rw-r--r--test/lisp/international/textsec-tests.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/lisp/international/textsec-tests.el b/test/lisp/international/textsec-tests.el
index b68bce1dc70..8385c116f4f 100644
--- a/test/lisp/international/textsec-tests.el
+++ b/test/lisp/international/textsec-tests.el
@@ -113,7 +113,10 @@
(ert-deftest test-suspiction-domain ()
(should (textsec-domain-suspicious-p "foo/bar.org"))
(should-not (textsec-domain-suspicious-p "foo.org"))
- (should (textsec-domain-suspicious-p "f\N{LEFT-TO-RIGHT ISOLATE}oo.org")))
+ (should (textsec-domain-suspicious-p "f\N{LEFT-TO-RIGHT ISOLATE}oo.org"))
+
+ (should (textsec-domain-suspicious-p "Сгсе.ru"))
+ (should-not (textsec-domain-suspicious-p "фСгсе.ru")))
(ert-deftest test-suspicious-local ()
(should-not (textsec-local-address-suspicious-p "larsi"))