protected function SearchApiSolrService::sanitizeHighlightValue in Search API Solr 7
Sanitizes a highlighted field value.
Parameters
string|array $value: Either a highlighted field value, or an array of such values.
string|null $field_id: (optional) The ID of the field for which this sanitizing occurs, if any.
Return value
string|array The sanitized input.
1 call to SearchApiSolrService::sanitizeHighlightValue()
- SearchApiSolrService::getExcerpt in includes/
service.inc - Extract and format highlighting information for a specific item from a Solr response.
File
- includes/
service.inc, line 1514
Class
- SearchApiSolrService
- Search service class using Solr server.
Code
protected function sanitizeHighlightValue($value, $field_id = NULL) {
if (is_array($value)) {
foreach ($value as $i => $nested_value) {
$value[$i] = $this
->sanitizeHighlightValue($nested_value, $field_id);
}
return $value;
}
return check_plain(strip_tags($value));
}