note 16394 deleted from function.nl2br by irc-html
| From: | irc-html@php.net | Date: | Thu, 17 Jan 2002 20:01:33 +0000 |
| Subject: | note 16394 deleted from function.nl2br by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-24994@lists.php.net to get a copy of this message | ||
Okay, two notes on the above function I mentioned. I've noticed it always omits one space if
the user adds spaces before any text at the beginning of a line. As far as I can tell, you would
need to use ereg_replace() to check for that.
The only other alternative would be to simply replace all spaces with " ", which I
didn't care to do. So, this works well enough to allow for any formatting users might want to
do in the way of adding multiple spaces between text in forms they submit. For instance, many
people use two spaces between all of their sentences; HTML normally doesn't reflect this if
they submit a form using this convention.