Changeset 4649 for branches/2.2.0.1/expressoMail1_2/inc
- Timestamp:
- 07/01/11 16:53:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/expressoMail1_2/inc/class.imap_functions.inc.php
r4611 r4649 1361 1361 } 1362 1362 1363 function replace_links( $body ) 1363 function replace_links( $body ) 1364 { 1365 // Trata urls do tipo aaaa.bbb.empresa 1366 // Usadas na intranet. 1367 // Substitui a função logo a seguir...(replace_links_OLD). 1368 $pattern = '/(?<=[\s|(<br>)|\n|\r|;])(((http|https|ftp|ftps)?:\/\/((?:[\w]\.?)+(?::[\d]+)?[:\/.\-~&=?%;@#,+\w]*))|((?:www?\.)(?:\w\.?)*(?::\d+)?[\:\/\w.\-~&=?%;@+]*))/i'; 1369 $replacement = '<a href="$3://$4$5" target="_blank">$4$5</a>'; 1370 $body = preg_replace($pattern, $replacement, $body); 1371 // E-mail address in the text should create a new e-mail on ExpressoMail 1372 $pattern = '/( |<|<|>)([A-Za-z0-9\.~?\/_=#\-]*@[A-Za-z0-9\.~?\/_=#\-]*)( |>|>|<)/im'; 1373 $replacement = '$1<a href="mailto:$2">$2</a>$3'; 1374 $body = preg_replace( $pattern, $replacement, $body ); 1375 return $body; 1376 } 1377 1378 function replace_links_OLD( $body ) 1364 1379 { 1365 1380 // Domains and IPs addresses found in the text and which is not a link yet should be replaced by one.
Note: See TracChangeset
for help on using the changeset viewer.