mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 12:05:29 +00:00
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…
x
Reference in New Issue
Block a user