BUG Remove non-displayable chars from Solr highlight results
This commit is contained in:
parent
919716a0ce
commit
a7629c8bb2
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue