Ignore:
Timestamp:
11/03/11 13:24:28 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2305 - Enviando alteracoes, desenvolvidas internamente na Prognus, do modulo ExpressoMail?.

File:
1 edited

Legend:

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

    r4986 r5134  
    215215 
    216216    function convert_specialchar($input) { 
    217         $special_char = false; 
    218         for ($i = 0; $i < strlen($input); $i++) { 
    219             if (preg_match('/[^a-z0-9.@~_+=&\'*^\ \-\[\]]/i', $input[$i])) { 
    220                 $special_char = true; 
    221                 $input = preg_replace('/\\' . $input[$i] . '/', '=' . bin2hex($input[$i]), $input); 
    222             } 
    223         } 
    224  
    225         if ($special_char) { 
    226             /*             * 
    227              * When using arrays with pattern and replacement, 
    228              * the keys are processed in the order they appear in the array. 
    229              * See preg_replace in php.net/preg_replace 
    230              * */ 
    231             $patterns[0] = '/=c3/i'; 
    232             $patterns[1] = '/ /'; 
    233             $replacements[1] = ''; 
     217        $temp_input = $input;   
     218        $temp_input = imap_8bit($temp_input);  
     219 
     220        $patterns[0] = '/ /';  
    234221            $replacements[0] = '_'; 
    235             $input = preg_replace($patterns, $replacements, $input); 
    236         } 
    237  
    238         return($input); 
     222        $temp_input = preg_replace($patterns, $replacements, $temp_input);   
     223        return ($temp_input); 
    239224    } 
    240225 
     
    522507        // Lê as regras fora do escritório; 
    523508        if ($this->newout != "") { 
    524             $newscriptfoot .= preg_replace("/[\\n\\r]/", "%0A", $this->newout) . "\n"; 
     509            $newscriptfoot .= preg_replace("/[\\n\\r]/", " ", $this->newout) . "\n"; 
    525510        } 
    526511        $newscriptfoot .= "#mode&&basic\n"; 
Note: See TracChangeset for help on using the changeset viewer.