The search term in the results breaks the HTML

[ad_1]

When searching for a term, the term is highlighted in the results by an EM tag. (I’ve simplified this using highlightPreTag and highlightPostTag in the algolia_search_params filter.) However, the EM tag is added within HTML attributes (e.g. the IMG and A tags), which breaks the page’s HTML.

Can this be fixed, or is there a way to completely remove the highlighting altogether? I’ve found attributesToHighlight but it’s unclear how to modify this using WordPress filters in the PHP code.

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer