Last active
November 12, 2015 10:40
-
-
Save odelrio/6ac18151e442053ae35c to your computer and use it in GitHub Desktop.
Smarty: br2nl modifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There's no br2nl modifier in Smarty, but you can convert break tags to new line characters by using: | |
regex_replace:"/<br.?\/?>/":"\n" | |
E.g.: | |
<textarea value="{$myText|regex_replace:"/<br.?\/?>/":"\n"}"></textarea> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment