From 0b2475ceed2411fcce8bc24bbdfcf511270892be Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Wed, 12 Jul 2006 08:41:44 +0000 Subject: [PATCH] ** // __ do not break url catcher anymore git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@81 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- banana/misc.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/banana/misc.inc.php b/banana/misc.inc.php index 7a782c4..6fb384c 100644 --- a/banana/misc.inc.php +++ b/banana/misc.inc.php @@ -493,8 +493,13 @@ function formatbody($_text, $format='plain', $flowed=false) $formatting = Array('\*' => 'strong', '_' => 'u', '/' => 'em'); + $word = '-a-z0-9\'âäàãéêëêïîìöôòõüûùÿ'; foreach ($formatting as $limit=>$mark) { - $res = preg_replace('@' . $limit . '([^\s]+)' . $limit . '@', "<$mark>\\1", $res); + $res = preg_replace('@([^' . $word . '])' + . $limit . '([' . $word . ']+)' . $limit + . '([^' . $word . '])@i' + ,'\1<' . $mark . '>\2\3' + , $res); } } -- 2.1.4