Changeset 7723


Ignore:
Timestamp:
01/09/13 15:38:40 (11 years ago)
Author:
antonio
Message:

Ticket #3276 - Corrigido problema com formatação de email ao encaminhar.

File:
1 edited

Legend:

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

    r7681 r7723  
    19941994        function replace_links_callback($matches)   
    19951995        { 
    1996             if($matches[3])  
    1997                     $pref = $matches[3];  
    1998             else  
    1999                     $pref = $matches[3] = 'http';  
     1996        if ($matches[1] == "background-image:url(") { 
     1997            return $matches[0]; 
     1998        } 
     1999 
     2000        if($matches[3])  
     2001            $pref = $matches[3];  
     2002        else  
     2003            $pref = $matches[3] = 'http';  
    20002004 
    20012005            return '<a href="'.$pref.'://'.$matches[4].$matches[5].'" target="_blank">'.$matches[0].'</a>';  
     
    20112015        {  
    20122016                // Trata urls do tipo aaaa.bbb.empresa   
    2013                 // Usadas na intranet.   
    2014                 $pattern = '/(?<=[\s|(<br>)|\n|\r|;])(((http|https|ftp|ftps)?:\/\/((?:[\w]\.?)+(?::[\d]+)?[:\/.\-~&=?%;@#,+\w]*))|((?:www?\.)(?:\w\.?)*(?::\d+)?[\:\/\w.\-~&=?%;@+]*))/i';    
    2015                 $body = preg_replace_callback($pattern,array( &$this, 'replace_links_callback'), $body); 
     2017                // Usadas na intranet.  
     2018 
     2019                $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); 
    20162021 
    20172022        } 
Note: See TracChangeset for help on using the changeset viewer.