PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail_Mime » Bug #3415

FROM ADDRESS with quote and double quotes

Details

Submitted2005-02-09 14:23 UTC
Fromfayefab at yahoo dot fr
Assignedsean
StatusNo Feedback
PackageMail_Mime
PHP Version4.3.10
OSGENTOO LINUX
Roadmaps(Not assigned)

Comments

[2005-02-09 14:23 UTC] fayefab at yahoo dot fr

Description:
------------
I have recieved a mail with something like that in the form headers.

["from"]=> string(51) ""L'équipe blablablas " <blablablas@blablablas.net>"

but when i want use this varialbes i have only string(23) ""L'équipe blablablas ""

I think the quote and the double quotes in the value is the problem.

I think with a addslashes in the pear classe resolve the bug when the value was initialize

[2005-02-17 18:06 UTC] hiroaki dot kawai at gmail dot com

I'd like to ask you, how did you tried to use that value?
Did you put the code like this:
print htmlspecialchars($header['from']);
or just simply put the var in HTML source?
print $header['from'];

[2005-02-17 18:44 UTC] fayefab at yahoo dot fr

I use that value in a another value but when I want to put this value in $from I have a part of $header['from'] because there are no filter or addslasches for quotes or doubles quotes.

Ex :
$from=$header['from'];

Sometime the I have : $header['from']=" "L'equipe du dimanche" <info@equipedudimanche.com>".

And when I want to print this value I have "L'equipe du dimanche" and not "L'equipe du dimanche" <info@equipedudimanche.com>.

I think $header['from'] need to have a filter for (",') or addslasches to block the effect of (",') in the value.