develooper Front page | perl.pep | Postings from May 2018

Re: behavior change regarding quoted strings

Thread Previous | Thread Next
From:
Eric Wong
Date:
May 16, 2018 10:50
Subject:
Re: behavior change regarding quoted strings
Message ID:
20180516105040.GA5453@dcvr
pali@cpan.org wrote:
> Hi!
> 
> On Friday 11 May 2018 18:52:13 Eric Wong wrote:
> > 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.
> 
> So you mean that input header
> 
>     "Quoted N'Ame" <foo@EXAMPLE.com>
> 
> is changed to
> 
>     "Quoted N\'Ame" <foo@EXAMPLE.com>
> 
> right?

Exactly.

> Both
> 
>     "Quoted N'Ame" <foo@EXAMPLE.com>
> 
>     "Quoted N\'Ame" <foo@EXAMPLE.com>
> 
> are syntactically and semantically valid and correct. And represent
> exactly same phrase. Just first one is shorter as an apostrophe
> character is not needed to escape. (But you can).

Ah, good point, I failed to realize that.

> Escaping ' character is done by Email::Address::XS module which
> Email::MIME uses. So it is not Email::MIME (related) code.

And I failed to realize Email::Address::XS was being used in
this case :x  (I mainly support whatever's packaged for Debian stable)

> Ok, I will change Email::Address::XS module to not escape ' character
> when it is not needed.

Thank you; it'll look a bit cleaner in the raw message, at least :>

> If you know more similar problems, please let me know.
> 
> Thanks for report!

Will do, thanks for catching this.  I guess this list covers
everything in Email::*, anyways?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About