Skip to the content
Documentation

The newlines are still in the output string

No ratings yet

.... which is a feature of the underlying nl2br php function.
See http://be.php.net/manual/en/function.nl2br.php
So to create for example a safe javascript string, this operator need to be patched.

Comments (1 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. Re: The newlines are still in the output string

    Gunnstein Lye ·

    One solution is to use this instead:

    {'The lazycatjumps overthe quick rat.'|explode('\n')|implode('')}