diff --git a/doku.php b/doku.php index 6cd0c0e0cf0d5388e43925267d6180d1f21b2946..dc5e0ec66f18f6abe129d67444d64335140cb712 100644 --- a/doku.php +++ b/doku.php @@ -27,6 +27,7 @@ if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){ require_once(DOKU_INC.'inc/init.php'); //import variables +$_REQUEST['id'] = str_replace("\xC2\xAD",'',$_REQUEST['id']); //soft-hyphen $QUERY = trim($_REQUEST['id']); $ID = getID(); diff --git a/inc/fulltext.php b/inc/fulltext.php index be3938cac35d0730e1076ea6b260aa3a681cd541..0f2414213b2e70db580197161558a43bb3886f08 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -304,6 +304,7 @@ function ft_pagesorter($a, $b){ */ function ft_snippet($id,$highlight){ $text = rawWiki($id); + $text = str_replace("\xC2\xAD",'',$text); // remove soft-hyphens $evdata = array( 'id' => $id, 'text' => &$text, diff --git a/inc/indexer.php b/inc/indexer.php index 9cf0792616f4ce4d3571b7daf594653434cd87d2..526c8db05982fa9973d9598422219b7bac7f8ab7 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -221,7 +221,14 @@ function idx_getPageWords($page){ list($page,$body) = $data; - $body = strtr($body, "\r\n\t", ' '); + $body = strtr($body, + array( + "\r" => ' ', + "\n" => ' ', + "\t" => ' ', + "\xC2\xAD" => '', //soft-hyphen + ) + ); $tokens = explode(' ', $body); $tokens = array_count_values($tokens); // count the frequency of each token