Hello, I noticed a behavior change somewhere in the Email::MIME
stack when header_str_set is passed a string with a single-quote
(') character in it.

On my Debian stable (stretch) machine the behavior is to
leave the single quote alone.  On Debian unstable/sid,
a backslash is added before the single-quote.

Changes from stretch to current sid are as follows:

perl (including Encode.pm)      5.24.1-3+deb9u3 -> 5.26.2-3
libemail-mime-perl              1.937-1 -> 1.946-1


libemail-mime-encodings-perl    1.315-1 -> 1.315-2
        (only Debian-specific packaging changes, I suspect)

I think the old behavior (not adding backslash) is correct, but
I'm not sure.  I can work around the problem with "header_set"

        use strict;
        use warnings;
        use Email::MIME;
        my $mime = Email::MIME->create;
        my $h = 'From';
        my $n = q("Quoted N'Ame" <f...@example.com>);
        $mime->header_str_set($h, $n);
        print $mime->header($h), "\n"; # adds backslash to '

Konstantin hit this with public-inbox on CentOS but using newer
modules from CPAN and older Perl:

        # cpanm --info Email::MIME
        # cpanm --info Email::MIME::Encodings
        # cpanm --info Email::Simple
        # perl --version

        This is perl 5, version 16, subversion 3 (v5.16.3) built for
        (with 33 registered patches, see perl -V for more detail)

Reply via email to