newline_to_br
Replaces line breaks (\n) in a string with HTML line break tags (<br>).
The returned HTML tags need to be rendered using {{{ }}} to prevent the br tag from being escaped.
string | newline_to_br() returns [string]
Params
-
stringstring: The variable in which the newline characters need to be replaced.
Example
{{{ product.description | newline_to_br() }}}
Was this article helpful to you?