Ignore:
Timestamp:
06/18/08 11:28:42 (16 years ago)
Author:
niltonneto
Message:

Versionamento 1.222
Ver changelog de alterações no Trac.

File:
1 edited

Legend:

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

    r122 r320  
    9696                 
    9797                $narray  = explode("_end_",$var_decode); 
    98                  
     98 
    9999                foreach($narray as $key=>$tmp){ 
    100100                        if($tmp != ""){ 
     
    196196                  $special_char = false; 
    197197                  for ( $i = 0; $i < strlen($input); $i++ ) 
    198                       if ( preg_match('/[ÁáÉéÍíÓóÚúÀàÈèÌìÒòÙùÇçÃãÕõÂâÊêÔô]/', $input[$i]) ) 
     198                      if ( preg_match('/[ÁáÉéÍíÓóÚúÀàÈèÌìÒòÙùÇçÃãÕõÂâÊêÔô®©§ªºÐ¹²³°¢¿Æ£µøæß«»Ø÷±¬]/', $input[$i]) ) 
    199199                      { 
    200200                          $special_char = true; 
    201201                          $input = preg_replace('/'.$input[$i].'/', '=' . bin2hex($input[$i]), $input); 
    202202                      } 
    203                    if ( $special_char ) 
     203                       
     204           if ( $special_char ) 
    204205                   { 
    205206                   /*  When using arrays with pattern and replacement, the keys are processed in the order they appear in the array. See preg_replace in php.net/preg_replace */ 
     
    210211                   $input = preg_replace($patterns, $replacements, $input); 
    211212                   } 
    212                    return($input); 
     213                   if (($input{0}) && (!eregi('^[a-zA-Z0-9=-]+$',$input))) 
     214                                return false;    
     215                        else 
     216                        return($input); 
    213217        } 
    214218 
     
    233237          $rule['from']              = $this->convert_specialchar($tmp1[3]); 
    234238          $rule['to']            = $this->convert_specialchar($tmp1[4]); 
    235           $rule['subject'] = $this->convert_specialchar($tmp1[5]); 
     239                 $rule['subject'] = $this->convert_specialchar($tmp1[5]); 
    236240          $rule['action']            = $tmp1[6]; 
    237           $rule['action_arg']    = utf8_encode(preg_replace("/\\r\\n/","\r\n",$tmp1[7])); 
     241                  $rule['action_arg']    = utf8_encode(preg_replace("/\\r\\n/","\r\n",$tmp1[7])); 
    238242          $rule['flg']               = $tmp1[8];    
    239243          $rule['field']                 = $tmp1[9]; 
Note: See TracChangeset for help on using the changeset viewer.