Remove dots ( ... ) from default search results descriptions ( snippet ) I want to remove dots from search results items descriptions to search result page ( Default Search ), i have used Drupal default search for the search result page so how to remove the dots from the search descriptions.

I tried with search and replace function using theme preprocess search result function but no luck.


  theme_preprocess_search_result()


 

function theme_preprocess_search_result(&amp;$variables) {

  $variables['search_excerpt'] = str_replace("...", "", $variables['snippet']['#markup']);

}


But it's not work as expected,if have any solution please put into comment.

Thanks in advance.
You use incorrect variable name.

Take a look for the search-result.html.twig template.
We have a snippet template variable.

Your code should looks like:

function theme_preprocess_search_result(&amp;$variables) {
  $variables['snippet']['#markup'] = str_replace('…', '', $variables['snippet']['#markup']);
}


Pay attention to …, this is a special symbol, not ... (three dots).