Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Find e-mail addresse like a@b.com in String::encodeEmail() (see #…
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Jan 2, 2013
1 parent e6ab7f9 commit 8e03685
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions system/docs/CHANGELOG.md
Expand Up @@ -4,6 +4,9 @@ Contao Open Source CMS Changelog
Version 3.0.2 (2013-XX-XX)
--------------------------

### Fixed
Find e-mail addresse like `a@b.com` in `String::encodeEmail()` (see #5175).

### Fixed
Make sure there is a minimal MooTools core version for the command scheduler
(see #5195).
Expand Down
2 changes: 1 addition & 1 deletion system/modules/core/library/Contao/String.php
Expand Up @@ -278,7 +278,7 @@ public static function censor($strString, $varWords, $strReplace='')
public static function encodeEmail($strString)
{
$arrEmails = array();
preg_match_all('/\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,6}/', $strString, $arrEmails);
preg_match_all('/\w([-._\w]*\w)?@\w([-._\w]*\w)?\.\w{2,6}/', $strString, $arrEmails);

foreach ((array) $arrEmails[0] as $strEmail)
{
Expand Down

0 comments on commit 8e03685

Please sign in to comment.