Limit the highlight (#42921)

This commit is contained in:
Fedir Zinchuk 2024-03-04 17:45:16 +02:00 committed by GitHub
parent 15eaa4345b
commit f8c67be561
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ final class Highlight extends CMSPlugin
&& empty($item->mime)
&& $params->get('highlight_terms', 1)
) {
$item->route .= '&highlight=' . base64_encode(json_encode($query->highlight));
$item->route .= '&highlight=' . base64_encode(json_encode(array_slice($query->highlight, 0, 10)));
}
}
}