From d5715314d95a74af3f6003c1d75e1bf3af38b570 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 11 Nov 2014 10:29:58 +0000 Subject: [PATCH] remove quotes enclosing mailaddresses on replaceEmailAdresses when replacing style to email@adress.es addresses --- phpgwapi/inc/class.translation.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.translation.inc.php b/phpgwapi/inc/class.translation.inc.php index f572979897..a8c59183b1 100644 --- a/phpgwapi/inc/class.translation.inc.php +++ b/phpgwapi/inc/class.translation.inc.php @@ -1112,12 +1112,12 @@ class translation //replace CRLF with something other to be preserved via preg_replace as CRLF seems to vanish $text = str_replace("\r\n",'<#cr-lf#>',$text); // replace emailaddresses eclosed in <> (eg.: ) with the emailaddress only (e.g: me@you.de) - $text = preg_replace("/(<|<a href=\")*(mailto:([\w\.,-.,_.,0-9.]+)(@)([\w\.,-.,_.,0-9.]+))(>|>)*/i","'$2 '", $text); + $text = preg_replace("/(<|<a href=\")*(mailto:([\w\.,-.,_.,0-9.]+)(@)([\w\.,-.,_.,0-9.]+))(>|>)*/i","$2 ", $text); //$text = preg_replace_callback("/(<|<a href=\")*(mailto:([\w\.,-.,_.,0-9.]+)(@)([\w\.,-.,_.,0-9.]+))(>|>)*/i",'self::transform_mailto2text',$text); //$text = preg_replace('~]+href=\"(mailto:)+([^"]+)\"[^>]*>~si','$2 ',$text); $text = preg_replace_callback('~]+href=\"(mailto:)+([^"]+)\"[^>]*>([ @\w\.,-.,_.,0-9.]+)<\/a>~si','self::transform_mailto2text',$text); - $text = preg_replace("/(([\w\.,-.,_.,0-9.]+)(@)([\w\.,-.,_.,0-9.]+))( |\s)*(<\/a>)*( |\s)*(>|>)*/i","'$1 '", $text); - $text = preg_replace("/(<|<)*(([\w\.,-.,_.,0-9.]+)@([\w\.,-.,_.,0-9.]+))(>|>)*/i","'$2 '", $text); + $text = preg_replace("/(([\w\.,-.,_.,0-9.]+)(@)([\w\.,-.,_.,0-9.]+))( |\s)*(<\/a>)*( |\s)*(>|>)*/i","$1 ", $text); + $text = preg_replace("/(<|<)*(([\w\.,-.,_.,0-9.]+)@([\w\.,-.,_.,0-9.]+))(>|>)*/i","$2 ", $text); $text = str_replace('<#cr-lf#>',"\r\n",$text); return 1; }