You should not do this and we don't support this.
If you are doing this to template, HTML templating is designed for building HTML items, but it doesn’t parse HTML stored in variables. This would open you up to XSS vulnerability.
We recommend not storing HTML at all in Algolia records. Records should only contain the data.