Read html from inside a getCSV

I have a CSV file with long texts, and I want to be able to insert things like line breaks, links, etc.
I’ve tried various escape characters, but nothing worked so far. The <br> is simply is part of the output text.

Any ideas? :slight_smile:

Assuming you trust the data, pass the value through the safeHTML function.

Using this example:
https://discourse.gohugo.io/t/group-data-from-csv-file/40159/3

{{/* Display the grouped data. */}}
<ul>
  {{ range $types }}
    <li>
      {{ . }}
      <ul>
        {{ range where $data "type" . }}
          <li>{{ .name | safeHTML }}</li>
        {{ end }}
      </ul>
    </li>
  {{ end }}
</ul>

perfect! thank you!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.