]> TLD Linux GIT Repositories - packages/spamassassin.git/blob - bug-869408-unescaped-brace-in-regex.patch
- from PLD
[packages/spamassassin.git] / bug-869408-unescaped-brace-in-regex.patch
1 Description: Unescaped left brace in regex leads to warnings with perl 5.26
2 Origin: https://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm?r1=1708863&r2=1791010&diff_format=h
3 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869408
4
5 Index: spamassassin-3.4.1/lib/Mail/SpamAssassin/PerMsgStatus.pm
6 ===================================================================
7 --- spamassassin-3.4.1.orig/lib/Mail/SpamAssassin/PerMsgStatus.pm
8 +++ spamassassin-3.4.1/lib/Mail/SpamAssassin/PerMsgStatus.pm
9 @@ -916,16 +916,16 @@ sub get_content_preview {
10      $str .= shift @{$ary};
11    }
12    undef $ary;
13 -  chomp ($str); $str .= " [...]\n";
14  
15    # in case the last line was huge, trim it back to around 200 chars
16    local $1;
17 -  $str =~ s/^(.{,200}).*$/$1/gs;
18 +  $str =~ s/^(.{200}).+$/$1 [...]/gm;
19 +  chomp ($str); $str .= "\n";
20  
21    # now, some tidy-ups that make things look a bit prettier
22 -  $str =~ s/-----Original Message-----.*$//gs;
23 +  $str =~ s/-----Original Message-----.*$//gm;
24    $str =~ s/This is a multi-part message in MIME format\.//gs;
25 -  $str =~ s/[-_\*\.]{10,}//gs;
26 +  $str =~ s/[-_*.]{10,}//gs;
27    $str =~ s/\s+/ /gs;
28  
29    # add "Content preview:" ourselves, so that the text aligns