Changeset 6806 for trunk


Ignore:
Timestamp:
07/18/12 15:28:03 (12 years ago)
Author:
marcosw
Message:

Ticket #2969 - Correção de bug ao enviar e-mail com vírgula entre aspas do nome

Location:
trunk/expressoMail1_2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r6802 r6806  
    25752575            } 
    25762576 
    2577             $toaddress = $db->getAddrs(explode(',', $params['input_to'])); //implode(',',); 
    2578             $ccaddress = $db->getAddrs(explode(',', $params['input_cc'])); //implode(',',); 
    2579             $ccoaddress = $db->getAddrs(explode(',', $params['input_cco'])); //implode(',',);  
     2577            /*Wraps the text dividing the emails as from ">,"*/ 
     2578            $toaddress = $db->getAddrs(preg_split('/>,/',preg_replace('/>,/', '>>,', $params['input_to']))); 
     2579            $ccaddress = $db->getAddrs(preg_split('/>,/',preg_replace('/>,/', '>>,', $params['input_cc']))); 
     2580            $ccoaddress = $db->getAddrs(preg_split('/>,/',preg_replace('/>,/', '>>,', $params['input_cco']))); 
    25802581 
    25812582            if ($toaddress["False"] || $ccaddress["False"] || $ccoaddress["False"]) { 
  • trunk/expressoMail1_2/js/draw_api.js

    r6717 r6806  
    28422842        // fim 
    28432843        // ALEXANDRE LUIZ CORREIA 
    2844         if(info_msg.toaddress2 != null ) 
     2844        if(info_msg.toaddress2 != null) 
    28452845        { 
    2846                 toaddress_array[ID] = info_msg.toaddress2.split(","); 
    2847  
     2846                toaddress_array[ID] = break_comma(info_msg.toaddress2); 
    28482847                if (toaddress_array[ID].length > 1) 
    28492848                { 
     
    33243323         
    33253324         //window.setTimeout(function() { $("#div_message_scroll_"+ID).focus() },250); 
     3325         
     3326        /* 
     3327         * @AUTHOR Marcos Luiz Wilhelm 
     3328         * @DATE 2012/07/17 
     3329         * @BRIEF Break out emails only with comma out of quote marks 
     3330         */ 
     3331        function break_comma (originalText){ 
     3332                var quotesMarks = false; 
     3333                var completeString = ""; 
     3334                var brokenEmails = new Array(); 
     3335                originalText+=","; 
     3336                for(i=0; i<originalText.length; i++){ 
     3337                        var character = originalText.substr(i,1); 
     3338                        if(character == "\""){ 
     3339                                quotesMarks = !quotesMarks; 
     3340                        } 
     3341                        if(!quotesMarks){ 
     3342                                if(character == ","){ 
     3343                                        brokenEmails.push(completeString); 
     3344                                        completeString = ""; 
     3345                                } 
     3346                                else 
     3347                                        completeString+=character;       
     3348                        } 
     3349                        else 
     3350                                completeString+=character; 
     3351                } 
     3352                return brokenEmails; 
     3353        } 
    33263354 
    33273355        function mailto( link ) 
     
    36883716                        } 
    36893717                        if(input.val() != ""){ 
     3718                                if(e.keyCode == 188 && !e.shiftKey && input.val().split("\"").length > 1){ 
     3719                                        return; 
     3720                                } 
    36903721                                if(e.keyCode != 9) 
    36913722                                        e.preventDefault(); 
Note: See TracChangeset for help on using the changeset viewer.