0

I have data like this

'{"text": "Sensibleness"\\, "min_value": "confusing<br>illogical<br>out of context<br>factually wrong"\\, "max_value": "common sense<br>logical coherence"},{"text": "Specificity"\\, "min_value": "boring<br>unspecific"\\, "max_value": "interesting"}'

I need to put it in the table with other elements

<div class="first-scale">
  <p><b>Answers</b></p>
  <table class="responses_table">
  {{#each responses}}
    <tr>
      <td rowspan="2" style="height:50px;vertical-align:bottom">{{text}} &nbsp; &nbsp; </td>
      <td style="text-align:left;vertical-align:bottom"><small>{{min_value}}</small> &nbsp; &nbsp;</td>
      <td style="text-align:right;vertical-align:bottom"><small>{{max_value}}</small></td>
    </tr>
    <tr>
      <td colspan="2" style="text-align:center;vertical-align:top">
        <input type="range" name="ratings" class="range"  min="1" max="100" value="50" 
        data-clicked=false onclick="((elem) => {elem.dataset.clicked = true})(this)">
      </td>
    </tr>
  {{/each}}
  </table>
</div>

In the end I've got this table:

table

Why <br> does not work? How to make it work? I cannot change data type. All I can do is change the separator from <br> to something else.

Martin
  • 16,093
  • 1
  • 29
  • 48
  • The values are being treated as `text` and are therefore HTML-encoded in the element. This is why `
    ` is being rendered as text. You need to output them as raw HTML instead
    – Martin Jun 25 '21 at 10:34
  • 1
    You need triple brackets. Read this: https://stackoverflow.com/questions/56105803/how-to-parse-a-string-to-html-in-handlebars – DanieleAlessandra Jun 25 '21 at 10:37

0 Answers0