Re: Bug #11611 Updated: nl2br() outputting invalid <br> tags
| From: | Matt McClanahan | Date: | Fri, 22 Jun 2001 18:56:18 +0000 |
| Subject: | Re: Bug #11611 Updated: nl2br() outputting invalid <br> tags | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-57693@lists.php.net to get a copy of this message | ||
On Fri, Jun 22, 2001 at 03:18:20PM +0200, lenar wrote:
> Shouldn't there be an optional flag to nl2br to change the behavior of
> function to what it used to be. Just there's no point in <br /> like tags
> when the rest of your code is just generating HTML compliant output, not
> XHTML.
>
> Ok, somebody can always use something like str_replace("\n", "<br>",
> $text) to get the old functionality.
What if the rest of your code is generating XHTML? It's better to assume
the more strict syntax, especially considering that nobody has yet found (to
my knowledge) a browser where <br /> doesn't work.
Matt