]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: return empty string to avoid undefined values
authorEric Wong <e@80x24.org>
Wed, 19 Aug 2015 19:36:11 +0000 (19:36 +0000)
committerEric Wong <e@80x24.org>
Wed, 19 Aug 2015 19:36:11 +0000 (19:36 +0000)
Sometimes we have filter bugs and let HTML slip through...

lib/PublicInbox/View.pm

index 5aab609ddb2a3258b9111c73bb6a2d9c78421550..b3545a4a9c3496220fe47d38aee20fa3e8c5cb9b 100644 (file)
@@ -197,7 +197,7 @@ sub index_walk {
        my $ct = $part->content_type;
 
        # account for filter bugs...
-       return if defined $ct && $ct =~ m!\btext/[xh]+tml\b!i;
+       return '' if defined $ct && $ct =~ m!\btext/[xh]+tml\b!i;
 
        my $enc = enc_for($ct, $enc_msg);