modifier.nl2brIfNotHTML.php
Tags
Table of Contents
Functions
- smarty_modifier_nl2brIfNotHTML() : string
- If the given string looks like HTML, do nothing and return it.
Functions
smarty_modifier_nl2brIfNotHTML()
If the given string looks like HTML, do nothing and return it.
smarty_modifier_nl2brIfNotHTML(string $text) : string
If it doesn't, replace newlines with br tags. The HTML check is somewhat greedy and may not add br tags to some non-HTML text that contains angle brackets.
Parameters
- $text : string
Return values
string —Text with br tags if input was non-HTML.