You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2019/09/20 14:13:18 UTC

svn commit: r1867230 - in /spamassassin/branches/3.4: lib/Mail/SpamAssassin/PerMsgStatus.pm t/get_headers.t

Author: hege
Date: Fri Sep 20 14:13:18 2019
New Revision: 1867230

URL: http://svn.apache.org/viewvc?rev=1867230&view=rev
Log:
Small fix for escaped quotes

Modified:
    spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
    spamassassin/branches/3.4/t/get_headers.t

Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=1867230&r1=1867229&r2=1867230&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm Fri Sep 20 14:13:18 2019
@@ -2064,6 +2064,7 @@ sub _get {
         # obs-phrase   = word *(word / "." / CFWS)
         $result =~ s{ " ( (?: [^"\\] | \\. )* ) " }
                 { my $s=$1; $s=~s{\\(.)}{$1}gs; $s }gsxe;
+        $result =~ s/\\"/"/gs;
       } elsif ($result =~ /^ [^(,]*? \( (.*?) \) /sx) {  # legacy form
         # nested comments are not handled, to be improved
         $result = $1;

Modified: spamassassin/branches/3.4/t/get_headers.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/get_headers.t?rev=1867230&r1=1867229&r2=1867230&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/get_headers.t (original)
+++ spamassassin/branches/3.4/t/get_headers.t Fri Sep 20 14:13:18 2019
@@ -97,7 +97,7 @@ ok(try('To11:name', ''));
 ok(try('To12:addr', 'jm@foo'));
 ok(try('To12:name', 'Some User <jm...@bar>'));
 ok(try('To13:addr', 'jm@foo'));
-ok(try('To13:name', 'Some User <\"Some User\"@bar>'));
+ok(try('To13:name', 'Some User <"Some User"@bar>'));
 ok(try('Hdr1', "foo   bar baz\n"));
 ok(try('Hdr1:raw', "    foo  \n  bar\n\tbaz \n  \n"));
 ok(try('To_bug5201_a:addr', 'jm@foo'));