Changeset 1482


Ignore:
Timestamp:
10/01/09 17:48:53 (10 years ago)
Author:
niltonneto
Message:

Ticket #672 - Correção crítica na RegExp? que transforma texto URL em link.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/expressoMail1_2/inc/class.imap_functions.inc.php

    r1406 r1482  
    10421042                        return $body; 
    10431043         
    1044                 $pattern = '/(?<=[\s|(<br>)|\n|\r|;])((http(s?):\/\/((?:[\w]\.?)+(?::[\d]+)?[:\/.\-~&=?%;@#,+\w]*))|((?:www?\.)(?:\w\.?)*(?::\d+)?[\:\/\w.\-~&=?%;@+]*))/i'; 
     1044                $pattern = '/(?<=[\s\><\n\r;])((http(s?):\/\/((?:[\w]\.?)+(?::[\d]+)?[\/.\-~&=?%;@#,+\w:]*))|((?:www?\.)(?:\w\.?)*(?::\d+)?[\/\w.\-~&=?%;@+]*))/i'; 
    10451045                $replacement = '<a href="http$3://$4$5" target="_blank">$1</a>'; 
    10461046                return preg_replace($pattern, $replacement, $body);  
Note: See TracChangeset for help on using the changeset viewer.