Index: trunk/phpwiki/fpw/special_dosearch.php |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | $res = "" ; |
52 | 52 | } else { |
53 | 53 | $oldpos = $pos; |
54 | | - while ( preg_match ( "/\w/", $search{$pos} ) ) $pos++ ; |
| 54 | + while ( preg_match ( "/[\\w\\x80-\\xff]/", $search{$pos} ) ) $pos++ ; |
55 | 55 | $word = substr ( $search, $oldpos, $pos - $oldpos ); |
56 | 56 | if ( preg_match( "/^".$not."$/i", $word ) ) { |
57 | 57 | $pos = $oldpos; |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | $res = " [-)] $res2" ; |
150 | 150 | } else { |
151 | 151 | $oldpos = $pos; |
152 | | - while ( preg_match ( "/\w/", $search{$pos} ) ) $pos++ ; |
| 152 | + while ( preg_match ( "/[\\w\\x80-\\xff]/", $search{$pos} ) ) $pos++ ; |
153 | 153 | $word = substr ( $search, $oldpos, $pos - $oldpos ); |
154 | 154 | if ( preg_match( "/^".$not."$/i", $word ) ) { |
155 | 155 | $res2 = srchStrParse ( 3 ) ; # we presume the not is redundant |
— | — | @@ -183,7 +183,7 @@ |
184 | 184 | $res = ""; |
185 | 185 | } else { |
186 | 186 | $oldpos = $pos; |
187 | | - while ( preg_match ( "/\w/", $search{$pos} ) ) $pos++ ; |
| 187 | + while ( preg_match ( "/[\\w\\x80-\\xff]/", $search{$pos} ) ) $pos++ ; |
188 | 188 | $word = substr ( $search, $oldpos, $pos - $oldpos ); |
189 | 189 | if ( preg_match( "/^".$not."$/i", $word ) ) { |
190 | 190 | $pos = $oldpos ; |
— | — | @@ -289,7 +289,7 @@ |
290 | 290 | $s .= "\n\n" . $wikiSearchHelp ; |
291 | 291 | } |
292 | 292 | else { |
293 | | - preg_match_all ( "/\"(\w+)\"/", $parsedCond, $matches ) ; |
| 293 | + preg_match_all ( "/\"([\\w\\x80-\\xff]+)\"/", $parsedCond, $matches ) ; |
294 | 294 | $words = $matches[1] ; # determine the search words (positive & negative) |
295 | 295 | |
296 | 296 | $fallbackSearch = 0 ; |