h2o-php
h2o-php copied to clipboard
nl2br no longer works due to auto escape feature
The nl2br filter does not work anymore, because the autoescape feature convert it to a literal
tag.
As current workarround, I've figured I can use:
{{ tagname | escape | nl2br | safe }}
But I find this a bit cumbersome. Would it be possible to find a better fix for this? (e.g. how django does it?)
I will look into this issue to make html filters to be escape awared. Thanks
Ahh, thank you for mentioning the workaround here. I had a few hours of hard time until I found it is a bug and this is the workaround.