From f384243908af90b98bce419835d98991a209a8e0 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Wed, 12 Jul 2006 13:04:37 +0000 Subject: [PATCH] Regexp cleaning git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@83 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- banana/misc.inc.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/banana/misc.inc.php b/banana/misc.inc.php index 6fb384c..2bb1905 100644 --- a/banana/misc.inc.php +++ b/banana/misc.inc.php @@ -493,11 +493,8 @@ function formatbody($_text, $format='plain', $flowed=false) $formatting = Array('\*' => 'strong', '_' => 'u', '/' => 'em'); - $word = '-a-z0-9\'âäàãéêëêïîìöôòõüûùÿ'; foreach ($formatting as $limit=>$mark) { - $res = preg_replace('@([^' . $word . '])' - . $limit . '([' . $word . ']+)' . $limit - . '([^' . $word . '])@i' + $res = preg_replace('@(\W)' . $limit . '(\w+)' . $limit . '(\W)@' ,'\1<' . $mark . '>\2\3' , $res); } -- 2.1.4