Catch accentuated characters in url catcher
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 27 Jan 2007 13:09:54 +0000 (13:09 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 27 Jan 2007 13:09:54 +0000 (13:09 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1412 839d8a87-29fc-0310-9880-83ba4fa771e5

include/url_catcher.inc.php

index 91db03c..e22fe8b 100644 (file)
@@ -7,11 +7,11 @@ function url_catcher($texte, $mails = true) {
     $replacement = array();
 
     // url commencant par http, https ou ftp
-    $patterns[] = '/((?:https?|ftp):\/\/(?:\.*,*[a-z@0-9~%$£µ&i#\-+=_\/\?;])*)/i';
+    $patterns[] = '/((?:https?|ftp):\/\/(?:\.*,*[\w@~%$£µ&i#\-+=_\/\?;])*)/i';
     $replacement[] = '<a href="\\0">\\0</a>';
 
     // url commencant par www.
-    $patterns[] = '/(\s|^)www\.((?:\.*,*[a-z@0-9~%$£µ&i#\-+=_\/\?;])*)/i';
+    $patterns[] = '/(\s|^)www\.((?:\.*,*[\w@~%$£µ&i#\-+=_\/\?;])*)/i';
     $replacement[] = '\\1<a href="http://www.\\2">www.\\2</a>';
 
     if ($mails) {