HTML tags inside CSV when rendered by shortcode

Greetings. I followed the example shortcode for csv->html table rendering, and happy that it works.
However, I have trouble using HTML tags in the CSV file, the shortcode escapes the brackets and other special characters.

How can I modify the reference shortcode (from assets section of documentation) so it would stop escaping the special symbols?

example CSV:

Pet, Name,   Color
Cat, Frisky, <i>black</i>
Dog, Rex,    red and <br/>white

If you trust the source of the CSV, pass the value through the safe.HTML function before rendering.

For example, in this csv-to-table shortcode:

...
  <th>{{ . | safe.HTML }}</th>
...
  <td>{{ . | safe.HTML }}</td>
...
1 Like

Thank you very much, just what I needed! I do trust CSV in this case, I author it.

1 Like