Changeset 7728 for trunk/expressoMail1_2/inc
- Timestamp:
- 01/10/13 14:46:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r7723 r7728 1658 1658 $content = $this->process_embedded_images($images,$msg_number,$content, $msg_folder); 1659 1659 $content = $this->replace_special_characters($content); 1660 1660 $this->replace_links($content); 1661 1661 $return['body'] = &$content; 1662 1662 … … 1936 1936 1937 1937 function replace_special_characters($body) 1938 { 1938 { 1939 1940 1941 1939 1942 if(trim($body) === '') return; 1940 1943 … … 1997 2000 return $matches[0]; 1998 2001 } 1999 2000 if($matches[ 3])2001 $pref = $matches[ 3];2002 2003 if($matches[4]) 2004 $pref = $matches[4]; 2002 2005 else 2003 $pref = $matches[3] = 'http'; 2004 2005 return '<a href="'.$pref.'://'.$matches[4].$matches[5].'" target="_blank">'.$matches[0].'</a>'; 2006 $pref = $matches[4] = 'http'; 2007 2008 $url = isset($matches[6]) ? $matches[5].$matches[6] : $matches[5]; 2009 2010 return '<a href="'.$pref.'://'.$url.'" target="_blank">'.$matches[0].'</a>'; 2006 2011 } 2007 2012 … … 2018 2023 2019 2024 $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); 2025 2026 $body = preg_replace_callback($pattern,array( &$this, 'replace_links_callback'), $body); 2021 2027 2022 2028 }
Note: See TracChangeset
for help on using the changeset viewer.