Changeset 7723
- Timestamp:
- 01/09/13 15:38:40 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r7681 r7723 1994 1994 function replace_links_callback($matches) 1995 1995 { 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'; 2000 2004 2001 2005 return '<a href="'.$pref.'://'.$matches[4].$matches[5].'" target="_blank">'.$matches[0].'</a>'; … … 2011 2015 { 2012 2016 // 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); 2016 2021 2017 2022 }
Note: See TracChangeset
for help on using the changeset viewer.