Changeset 2039


Ignore:
Timestamp:
02/22/10 13:41:26 (14 years ago)
Author:
rodsouza
Message:

Ticket #859 - Refinamento da expressão regular que busca por URLs no corpo do e-mail.

File:
1 edited

Legend:

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

    r2037 r2039  
    11761176 
    11771177                // Url found in the text and which is not a link yet should be replaced by one. 
    1178                 $pattern = '/(^|\w>|[ \(\[])((http(s)?:\/\/)?([\w\d_\-@]{2,}(\.[\w\d~?\/_=&#;\-:@$]+)+))/im'; 
     1178                $pattern = '/(^|[\w"]>|[ \(\[])((http(s)?:\/\/)?([\w\d_\-@]{2,}(\.[\w\d~?\/_=&#;\-:@$]+)+))/im'; 
    11791179                $replacement = '$1<a href="http$4://$5" target="_blank">$2</a>'; 
    11801180                $body = preg_replace( $pattern, $replacement, $body ); 
Note: See TracChangeset for help on using the changeset viewer.