List:Eventum Development« Previous MessageNext Message »
From:Elan Ruusamäe Date:July 6 2005 10:55pm
Subject:Re: Two small patches.
View as plain text  
On Wednesday 06 July 2005 10:43, Jeffrey D. Wheelhouse wrote:
> +                "sender_name" =>
> preg_replace("/\"/","",Mail_API::getName($sender))
i believe it's better to trim it in a pairs, and also trim single quotes, 
which outlook-type clients like to include, because there could be names like 
Jeffrey 'o Wheelhouse
or Jeffrey "D" Wheelhouse  :)

preg_replace('/^(["\'])(.+)(\1)$/g', '$2', Mail_API::getName($sender));

ps: pattern not tested, don't take it as full truth :)

-- 
glen
Thread
Two small patches.Jeffrey D. Wheelhouse6 Jul
  • Re: Two small patches.Elan Ruusamäe7 Jul