nl2br

The nl2br filter accepts one string argument and converts all newline characters into HTML BR tags.

{{ "This is\n a newline"|nl2br }}