djondinium
4 years agoExpert
Remove highlight class from messages.search_snippet
Hello all, We have a custom homepage component built that is showing a few latest threads from our Announcement board. Simple stuff. The problem is that the 'search_snippet' is highlighting the...
- 4 years ago
The "search_snippet" is doing exactly what it is intended to do. So usually don't recommend using that field for that reason (unless to display search results).
Otherwise... options include:
- Use messages.body instead; then trim HTML with utils.owasp freemarker context object, then trim to X number of characters.
- Taking the HTML of messages.search_snippet and doing a ?replace("lia-search-match-lithium","") on the string