about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-04 10:38:20 +0000
committerEric Wong <e@80x24.org>2019-06-04 10:38:20 +0000
commite56b908c0e97c2f479b350dfb0868bc463413b89 (patch)
tree6b8a8fc59840ebc3e6bee1bbb2e3a5e568bce351 /t
parentd5c56e2a1adde279ff86fbd0be81a6b7e5ba0896 (diff)
parent91af69a41f2963f1f952cb0932ed23cd86cd1093 (diff)
downloadpublic-inbox-e56b908c0e97c2f479b350dfb0868bc463413b89.tar.gz
* charclass: (24 commits)
  www: require ASCII word characters for CSS filenames
  www: require ASCII range for mbox downloads
  githttpbackend: require ASCII in path
  require ASCII digits for local FS items
  www: require ASCII digit for git epoch
  solver|viewdiff: restrict digit matches to ASCII
  inbox: require ASCII digits for feedmax var
  filter/rubylang: require ASCII digit for mailcount
  msgtime: require ASCII digits for parsing dates
  searchview: do not allow non-ASCII offsets and limits
  githttpbackend: require Range:, Status: to be ASCII digits
  view: require YYYYmmDD(HHMMSS) timestamps to be ASCII
  newswww: only accept ASCII digits as article numbers
  config: do not accept non-ASCII digits in cgitrc params
  www: require ASCII filenames in git blob downloads
  www: only emit ASCII chars in attachment filenames
  wwwattach: only pass the charset through if ASCII
  wwwlisting: require ASCII digit for port number
  http: require SERVER_PORT to be ASCII digit
  feed: only accept ASCII digits for ref~$N
  ...
Diffstat (limited to 't')
-rw-r--r--t/linkify.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/linkify.t b/t/linkify.t
index fe218b91..c4923582 100644
--- a/t/linkify.t
+++ b/t/linkify.t
@@ -132,4 +132,16 @@ use PublicInbox::Linkify;
                 'punctuation with unpaired ) OK')
 }
 
+if ('IDN example: <ACDB98F4-178C-43C3-99C4-A1D03DD6A8F5@sb.org>') {
+        my $hc = '&#26376;';
+        my $u = "http://www.\x{6708}.example.com/";
+        my $s = $u;
+        my $l = PublicInbox::Linkify->new;
+        $s = $l->linkify_1($s);
+        $s = $l->linkify_2($s);
+        my $expect = qq{<a
+href="http://www.$hc.example.com/">http://www.$hc.example.com/</a>};
+        is($s, $expect, 'IDN message escaped properly');
+}
+
 done_testing();