aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-01-19 16:37:05 +0100
committerLars Ingebrigtsen2022-01-19 16:37:05 +0100
commit1bfc086391c3ee0ae8a5ae667b67f1109aa74dc9 (patch)
tree9d0d18ce1adfd7ada8a641e4b08727d2e2810ded /test
parent00a694628382ba378978aa4de33bff7d17034c84 (diff)
downloademacs-1bfc086391c3ee0ae8a5ae667b67f1109aa74dc9.tar.gz
emacs-1bfc086391c3ee0ae8a5ae667b67f1109aa74dc9.zip
Make shr mark links with suspicious URLs
* lisp/international/textsec-check.el (textsec-propertize): New function. (textsec-check): Only check, don't alter STRING. * lisp/international/textsec.el (textsec-url-suspicious-p): New function. * lisp/net/shr.el (shr-tag-a): Mark suspicious links.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/international/textsec-tests.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lisp/international/textsec-tests.el b/test/lisp/international/textsec-tests.el
index c6268d14c7d..c7cf56757cd 100644
--- a/test/lisp/international/textsec-tests.el
+++ b/test/lisp/international/textsec-tests.el
@@ -164,4 +164,8 @@
164 (should (textsec-email-address-header-suspicious-p 164 (should (textsec-email-address-header-suspicious-p
165 "דגבא <foo@bar.com>"))) 165 "דגבא <foo@bar.com>")))
166 166
167(ert-deftest test-suspicious-url ()
168 (should-not (textsec-url-suspicious-p "http://example.ru/bar"))
169 (should (textsec-url-suspicious-p "http://Сгсе.ru/bar")))
170
167;;; textsec-tests.el ends here 171;;; textsec-tests.el ends here