diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-08-10 07:53:17 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-08-10 07:53:17 +0000 |
| commit | 79a09d27efa669b1b2e065f90526db00aafc758e (patch) | |
| tree | 9ff38f909ad48fa199bccdef3c434762e8d6447d | |
| parent | 5ed4ee204f5e629013505c51bb702dc4f6b7de59 (diff) | |
- Improve email regexp in mailto: links handler (#1486808)
git-svn-id: https://svn.roundcube.net/trunk@3888 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/include/rcube_string_replacer.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_string_replacer.php b/roundcubemail/program/include/rcube_string_replacer.php index 03c04dd63..0568cc072 100644 --- a/roundcubemail/program/include/rcube_string_replacer.php +++ b/roundcubemail/program/include/rcube_string_replacer.php @@ -39,7 +39,10 @@ class rcube_string_replacer $url_chars_within = '\?\.~,!'; $this->link_pattern = "/([\w]+:\/\/|\Wwww\.)([a-z0-9\-\.]+[a-z]{2,4}([$url_chars$url_chars_within]*[$url_chars])?)/i"; - $this->mailto_pattern = "/([a-z0-9][a-z0-9\-\.\+\_]*@([a-z0-9]([-a-z0-9]*[a-z0-9])?\\.)+[a-z]{2,5})/i"; + $this->mailto_pattern = "/(" + ."[-\w!\#\$%&\'*+~\/^`|{}=]+(?:\.[-\w!\#\$%&\'*+~\/^`|{}=]+)*" // local-part + ."@([a-z0-9]([-a-z0-9]*[a-z0-9])?\\.)+[a-z]{2,5}" // domain-part + .")/i"; } /** |
