BUG Remove non-displayable chars from Solr highlight results

This commit is contained in:
Ingo Schommer 2013-03-11 10:50:14 +01:00
parent 919716a0ce
commit a7629c8bb2
1 changed files with 5 additions and 2 deletions

View File

@ -440,6 +440,9 @@ abstract class SolrIndex extends SearchIndex {
$combinedHighlights = array_merge($combinedHighlights, $highlights);
}
$result->Excerpt = DBField::create_field('HTMLText', implode(' ... ', $combinedHighlights));
// Remove entity-encoded U+FFFD REPLACEMENT CHARACTER.
// It signifies non-displayable characters, and shows up as such itself in browsers (questionmark icon)
$result->Excerpt = str_replace('�', '', $result->Excerpt);
}
}
}