diff options
author | Eric Wong <e@80x24.org> | 2016-06-17 17:47:59 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-06-17 19:03:02 +0000 |
commit | 0f481af87d4dfca6599eac74690f8624025c80f6 (patch) | |
tree | 0ed0048e01b13a3479ca0580518934e3ccc10dac /lib | |
parent | 38a90ce29cb9cae6f045f516ef160d8e6accdd21 (diff) | |
download | public-inbox-0f481af87d4dfca6599eac74690f8624025c80f6.tar.gz |
Try to be descriptive for some of these.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Filter/Base.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/PublicInbox/Filter/Base.pm b/lib/PublicInbox/Filter/Base.pm index 37f1ee7e..b2bb1462 100644 --- a/lib/PublicInbox/Filter/Base.pm +++ b/lib/PublicInbox/Filter/Base.pm @@ -8,11 +8,14 @@ use warnings; use PublicInbox::MsgIter; use constant MAX_MID_SIZE => 244; # max term size - 1 in Xapian -my $NO_HTML = '*** We only accept plain-text mail, no HTML ***'; +sub No ($) { "*** We only accept plain-text mail, No $_[0] ***" } + our %DEFAULTS = ( - reject_suffix => [ qw(exe bat cmd com pif scr vbs cpl zip) ], - reject_type => [ "text/html:$NO_HTML", "text/xhtml:$NO_HTML", - 'application/vnd.ms-*:No proprietary data formats' ], + reject_suffix => [ qw(exe bat cmd com pif scr vbs cpl zip swf swfl) ], + reject_type => [ 'text/html:'.No('HTML'), 'text/xhtml:'.No('HTML'), + 'application/vnd.*:'.No('vendor-specific formats'), + 'image/*:'.No('images'), 'video/*:'.No('video'), + 'audio/*:'.No('audio') ], ); our $INVALID_FN = qr/\0/; |