| | |
| | | <?php |
| | | |
| | | /* |
| | | /** |
| | | +-----------------------------------------------------------------------+ |
| | | | program/include/rcmail_string_replacer.php | |
| | | | | |
| | |
| | | * Helper class for turning URLs and email addresses in plaintext content |
| | | * into clickable links. |
| | | * |
| | | * @package Core |
| | | * @package Webmail |
| | | * @subpackage Utils |
| | | */ |
| | | class rcmail_string_replacer extends rcube_string_replacer |
| | |
| | | { |
| | | $href = $matches[1]; |
| | | $suffix = $this->parse_url_brackets($href); |
| | | $email = $href; |
| | | |
| | | if (strpos($email, '?')) { |
| | | list($email,) = explode('?', $email); |
| | | } |
| | | |
| | | // skip invalid emails |
| | | if (!rcube_utils::check_email($email, false)) { |
| | | return $matches[1]; |
| | | } |
| | | |
| | | $i = $this->add(html::a(array( |
| | | 'href' => 'mailto:' . $href, |