I included your nice plugin on my local development environment and wondered why it sometimes breaks my layout. It seems to me that html tags are not stripped for the result text. As a workaround i included "HTML::strip" to the markQuery funtion at Result.php and it works now. I do not know if this is the right place to do this properly but now it won't break my layout anymore.
private function markQuery($text)
{
// Only mark the query if this feature is enabled
if ( ! Settings::get('mark_results', true)) {
//return $text;
return Html::strip($text);
}
return (string)preg_replace('/(' . preg_quote($this->query, '/') . ')/i', '<mark>$0</mark>', Html::strip($text));
}
Last updated