Rendering HTML and Escape characters inside of text fields

I was wondering if it’s possible to parse HTML and new line characters contained within text fields returned by a query.

I feel like I got this to work when working at another company but forgot the approach I used. I also feel like articles existed for this at one point, but seem to have been purged/archived by the new Looker Community platform.

I tried this but to no avail:

  dimension: test {
sql: '<b>some text</b>\nnew line' ;;
html: <html>{{rendered_value}}</html> ;;
}

 The expected result would be:


some text
new line

However, what I get is this:

6c644070-b1c0-4aac-a9cb-0a47c227099f.png

To get new lines working, I did the following which works:
 

  dimension: test {
sql: '<b>some text</b>|new line' ;;
html:
{% assign rows = {{value}} | split: '|' %}
{% for row in rows %}
{{row}}<br>
{% endfor %}
;;
}
135ecfcd-78ef-48ee-989d-96d53bdf1a3a.png
2 0 574
0 REPLIES 0
Top Labels in this Space
Top Solution Authors