Skip to content

How to escape HTML in highlight (vanilla JS implementation)? #1131

Answered by Haroenv
thecristen asked this question in Q&A
Discussion options

You must be logged in to vote

You’ll need to make sure you’re sending all the same parameters to Algolia in your backend as getAlgoliaResults would. For highlight to work as expected that’s highlightPreTag/PostTag the same values as used (__aa-highlight__/__/aa-highlight).

I’d recommend you use the built-in functions though, there’s a lot of differences between fetching done by the api client and getAlgiliaResults (caching, deduplication, retry strategy and SLA to name just some)

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Haroenv
Comment options

Answer selected by thecristen
@thecristen
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants