Re: Bug #11611 Updated: nl2br() outputting invalid <br> tags

From: Date: Sun, 24 Jun 2001 21:13:04 +0000
Subject: Re: Bug #11611 Updated: nl2br() outputting invalid <br> tags
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-57873@lists.php.net to get a copy of this message
On Sun, 24 Jun 2001, [iso-8859-15] Lenar Lõhmus wrote: > > Yes, agree, but this change has happend not much time ago, and I think > it's one's responsibility to maintain the behavior what it used to > be. Even more if the old syntax was generating standard compliant code > (and HTML4 is a standard). This syntax is perfectly html 4.01 (transistional) compliant. (Try requesting this link through validator.w3.org: http://defiant.jdimedia.nl:7480/php-hacking/php11611.php (only works during night hours in GMT) > > Still, we must evolve, so a syntax like > nl2br(string text [boolean html4]) would give the most up to date > behaviour of this function, giving somebody an option to get the old > behaviour when it's really neccessary. It is never neccesary, unless Microsoft (or any other) wrote a browser that is not adhering to the standards. > > And ... you don't know a browser where <br /> dowsn't work? But there > might be one ... one's own specific implementation where creator haven't > thought up possibility that "<br>" might be "<br />" one day. > Since it is > not neccessary for HTML to recognize "/" in the end of single tag then we > can't really blame him. Browsers should ignore things which they don't recognise: (from http://www.w3.org/TR/1999/REC-html401-19991224/html40.txt, paragraph 7.2) Note. As of the 24 December version of HTML 4.01, the HTML Working Group commits to the following policy: * Any changes to future HTML 4 DTDs will not invalidate documents that conform to the DTDs of the present specification. The HTML Working Group reserves the right to correct known bugs. * Software conforming to the DTDs of the present specification may ignore features of future HTML 4 DTDs that it does not recognize. This was also the case with earlier versions of HTML. regards, Derick Rethans --------------------------------------------------------------------- PHP: Scripting the Web - www.php.net - derick@php.net SRM: Site Resource Manager - www.vl-srm.net ---------------------------------------------------------------------

« previous php.dev (#57873) next »