Changeset 7728


Ignore:
Timestamp:
01/10/13 14:46:22 (11 years ago)
Author:
cristiano
Message:

Ticket #3276 - Problema para encaminhar certas mensagens

File:
1 edited

Legend:

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

    r7723 r7728  
    16581658                $content = $this->process_embedded_images($images,$msg_number,$content, $msg_folder); 
    16591659                $content = $this->replace_special_characters($content); 
    1660                 $this->replace_links($content); 
     1660              $this->replace_links($content); 
    16611661                $return['body'] = &$content; 
    16621662                 
     
    19361936 
    19371937        function replace_special_characters($body)  
    1938         {                
     1938        { 
     1939 
     1940 
     1941 
    19391942            if(trim($body) === '') return; 
    19401943             
     
    19972000            return $matches[0]; 
    19982001        } 
    1999  
    2000         if($matches[3])  
    2001             $pref = $matches[3];  
     2002                 
     2003        if($matches[4])  
     2004            $pref = $matches[4];  
    20022005        else  
    2003             $pref = $matches[3] = 'http';  
    2004  
    2005             return '<a href="'.$pref.'://'.$matches[4].$matches[5].'" target="_blank">'.$matches[0].'</a>';  
     2006            $pref = $matches[4] = 'http';   
     2007                         
     2008                $url = isset($matches[6]) ? $matches[5].$matches[6] : $matches[5]; 
     2009 
     2010            return '<a href="'.$pref.'://'.$url.'" target="_blank">'.$matches[0].'</a>';  
    20062011        }  
    20072012 
     
    20182023 
    20192024                $pattern = '/(background-image\:url\()?(?<=[\s|(<br>)|\n|\r|;])(((http|https|ftp|ftps)?:\/\/((?:[\w]\.?)+(?::[\d]+)?[:\/.\-~&=?%;@#,+\w]*))|((?:www?\.)(?:\w\.?)*(?::\d+)?[\:\/\w.\-~&=?%;@+]*))/i';    
    2020         $body = preg_replace_callback($pattern,array( &$this, 'replace_links_callback'), $body); 
     2025        
     2026                $body = preg_replace_callback($pattern,array( &$this, 'replace_links_callback'), $body); 
    20212027 
    20222028        } 
Note: See TracChangeset for help on using the changeset viewer.