algolia / instantsearch

⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/
MIT License
3.67k stars 514 forks source link

HTML encoding #1778

Closed ryanmitchell closed 7 years ago

ryanmitchell commented 7 years ago

Hello

There could be a way around this, but any HTML encoded values (e.g. £) are displayed as the encoded value, rather than the symbol they should be displaying (£).

To explain I have a value in my template of {{ text }} and that attribute in algolia contains an encoded value, then the encoded value is output rather than the symbol

Is there a way around this?

Thanks Ryan

bobylito commented 7 years ago

Hi @ryanmitchell. Thanks for opening this issue. Have you tried with {{{ text }}}?

ryanmitchell commented 7 years ago

Thanks Alex - thats done the trick.

Apologies if that was obvious and I missed it.

On 29 Dec 2016, at 09:34, Alex S notifications@github.com wrote:

Hi @ryanmitchell https://github.com/ryanmitchell. Thanks for opening this issue. Have you tried with {{{ text }}}?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/algolia/instantsearch.js/issues/1778#issuecomment-269604115, or mute the thread https://github.com/notifications/unsubscribe-auth/AADKu3SwQPtI30TMiVO5AOVpdRkpQOjnks5rM36lgaJpZM4LUtAH.

bobylito commented 7 years ago

It was obviously not obvious :) Truth is I asked myself this many times ;)

zeke commented 5 years ago

Wondering how to do this with instantsearch v3...

Haroenv commented 5 years ago

@zeke, not sure what the issue is exactly (best to have a reproduction for that, using our template,available for that purpose here), but does your hits have escapeHTML: false? That's required for us not to do escaping :)