function ewiki_page_search($id, &$data, $action) {
+ global $CFG;
+
$o = ewiki_make_title($id, $id, 2, $action);
if (! ($q = @$_REQUEST["q"])) {
else {
$found = array();
- $q = preg_replace('/\s*[^\w]+\s*/', ' ', $q);
+ if ($CFG->unicodedb) {
+ $q = preg_replace('/\s*[\W]+\s*/u', ' ', $q);
+ } else {
+ $q = preg_replace('/\s*[^\w]+\s*/', ' ', $q);
+ }
foreach (explode(" ", $q) as $search) {
if (empty($search)) { continue; }