[SOLVED] Experience with Instantsearch.js using template and mustache

Hi all, rencently i try to create search index using Algolia using instantsearch and mustace. I found that i have to wrap the mustache template with another curly brackets. for the example <h1>{{ "{{title}}" }}</h1> The problem is it didn’t work when i put the mustache inside HTML attribute href and src

Not sure about what makes it fail, either because the curly brackets conflict or the mustache it self.

my code looks like this

<script type="text/html" id="hit-template">
      <img src='{{ "{{image}}" }}' alt="{{ "{{alt}}" }}">  // output src rendered as {{image}}
      <a href="{{ "{{permalink}}" }}"> // output href rendered as {{permalink}}
      <h2>{{ "{{{_highlightResult.title.value}}}" }}</h2>  // sucesfully rendered
      <p class="hit-description">{{ "{{{_highlightResult.summary.value}}}" }}</p> // sucesfully rendered  

I wonder if anyone here have succesfuly with instantsearch.js can share me how to make rendered as it should be


Solved, found the answer here

I have to wrap the HTML with {{ safeHTML .... many thanks to @jetwash