Fix a regexp
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Fri, 12 Jan 2007 13:56:54 +0000 (13:56 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:35:15 +0000 (00:35 +0100)
git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@157 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/message.func.inc.php

index 8164172..c91c6da 100644 (file)
@@ -92,7 +92,7 @@ function banana_catchFormats($text)
     $text = str_replace($urls[0], "&&&urls&&&", $text);
     foreach ($formatting as $limit=>$mark) {
         $limit = preg_quote($limit, '/');
-        $text = preg_replace("/$limit\\b(.*?)\\b$limit/s",
+        $text = preg_replace("/$limit\\b(\w*?)\\b$limit/us",
                              "<$mark>\\1</$mark>", $text);
     }
     return preg_replace('/&&&urls&&&/e', 'array_shift($urls[0])', $text);