summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-23 17:25:05 +0000
committeralecpl <alec@alec.pl>2009-09-23 17:25:05 +0000
commitcb9fc852cf39d91dfa1dc915073914fd153e774a (patch)
treed312cd4028d61c38f8d98db6fbe330afa2ef193c
parent1cead0cbf40468233f1f644ee6bf11835c74737a (diff)
- Fix regular expression for e-mail address (#1486152)
-rw-r--r--CHANGELOG1
-rw-r--r--program/include/rcube_string_replacer.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 20faf06be..1eb7c8c6a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
+- Fix regular expression for e-mail address (#1486152)
- Fix Received header format
- Implemented sorting by message index - added 'index_sort' option (#1485936)
- Fix dl() use in installer (#1486150)
diff --git a/program/include/rcube_string_replacer.php b/program/include/rcube_string_replacer.php
index 2625fdfb9..b1c1fbbbe 100644
--- a/program/include/rcube_string_replacer.php
+++ b/program/include/rcube_string_replacer.php
@@ -39,7 +39,7 @@ 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 = "/([a-z0-9][a-z0-9\-\.\+\_]*@([a-z0-9]([-a-z0-9]*[a-z0-9])?\\.)+[a-z]{2,5})/i";
}
/**