this will break if they put spaces on the blank lines and also probably won't work right if they're on a platform that sends \n\r instead of just \n.
i usually use something like:
$comment = "<p>" . (join '</p><p>', grep {!/^\s+$/} split /[\n\r]+/, $comment) . "</p>";
which could be adapted to use <br> instead of <p> tags if you prefer.
In reply to Re: Re: HTML String Parsing
by thraxil
in thread HTML String Parsing
by Ionizor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |