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

From: Date: Sun, 24 Jun 2001 21:59:57 +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-57881@lists.php.net to get a copy of this message
The point of this is... <br /> is complaint with existing html standards and the new xhtml standard. While <br> is *not* compliant with new XHTML standards. Why make the programmers go back and make changes for no reason? Or for reasons like "It's pointless to output <br /> tags in HTML 4 code."? Daniel ----- Original Message ----- From: <derick@php.net> To: "Lenar Lõhmus" <lenar@dotcom.ee> Cc: "Matt McClanahan" <cardinal@dodds.net>; "PHP Developers Mailing List" <php-dev@lists.php.net> Sent: Sunday, June 24, 2001 4:13 PM Subject: Re: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid <br> tags > 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 > --------------------------------------------------------------------- > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.dev (#57881) next »