camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthz (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CAMEL-3199) Allow : and , inside quoted names for addresses
Date Wed, 06 Oct 2010 18:20:42 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62376#action_62376
] 

Karthz edited comment on CAMEL-3199 at 10/6/10 2:18 PM:
--------------------------------------------------------

In MailBinding.java, in the method appendRecipientToMimeMessage(), 

{code} 
replace this line

        String[] lines = recipient.split("[,;]");

with 

        String[] lines = recipient.split("[,;](?=([^\"]*\"[^\"]*\")*[^\"]*$)");
{code} 


The regex just does a lookahead to see if every quote has its matching quote till the end.

      was (Author: karthz):
    In MailBinding.java, in the method appendRecipientToMimeMessage(), replace this line

        String[] lines = recipient.split("[,;]");

with 

        String[] lines = recipient.split("[,;](?=([^\"]*\"[^\"]*\")*[^\"]*$)");


The regex just does a lookahead to see if every quote has its matching quote till the end.
  
> Allow : and , inside quoted names for addresses
> -----------------------------------------------
>
>                 Key: CAMEL-3199
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3199
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 2.4.0
>            Reporter: Tracy Snell
>            Assignee: Tracy Snell
>            Priority: Minor
>             Fix For: 2.5.0
>
>         Attachments: camel-mail-patch.txt
>
>
> "Snell, Tracy" <tjs@juicelabs.com> breaks with the current address parsing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message