How not to parse some parts of templates


Hi, I am trying to implement search with algolia and I would like to render allItems template based on script inserted in the html.

Hugo fails to compile my template, as it tries to interpret it as hugo template (usage of {{#hits}).

This is inside my partial/search.html

<script type="text/html" id="hits-template">
  <table class="table table-striped table-condensed">
      <tr><td><a href="#hit-{{objectID}}">{{section}}</a></td><td>{{title}}</td><td>{{url}}</td></tr>

This is my JS

      container: '#hits',
      templates: {
          empty: 'No results',
          allItems: document.getElementById('hits-template').innerHTML  // <-- importing the template which is written in mustache 


It there a way to tell Hugo to not parse some parts of temple?


Pass certain parts through a function like safeHTML. There are a lot of functions, so read through them and search the forums for similar questions, there are a lot of examples.