Re: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid br tags
Derick Rethans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Fri, 22 Jun 2001, 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. br / is HTML compliant too, and there is no single browser who doesn't get it. But it's not the behaviour up to today of this function. And I suggested only optional flag for getting old behavior. Like nl2br(string text [boolean html]). And to avoid rest, I say it more clearly: I agree it should generate XHTML _by_default_. lenar -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid br tags
Uh, ok. I give up. I just wasn't able earlier to find this paragraph from spec. Sorry if I disturbed you too much :) lenar. 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 Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid br tags
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: [EMAIL PROTECTED] To: Lenar Lõhmus [EMAIL PROTECTED] Cc: Matt McClanahan [EMAIL PROTECTED]; PHP Developers Mailing List [EMAIL PROTECTED] 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 - [EMAIL PROTECTED] SRM: Site Resource Manager - www.vl-srm.net - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid br tags
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. lenar. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ID: 11611 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Closed Status: Bogus Bug Type: Strings related Operating system: PHP Version: 4.0.5 Assigned To: Comments: Could this be even more bogus? :) Previous Comments: --- [2001-06-22 04:39:51] [EMAIL PROTECTED] It's XHTML compliant --- [2001-06-21 22:13:10] [EMAIL PROTECTED] put this into a test php file: ?php $temp = "this isnna testn"; printf("%s", nl2br($temp)); ? and you should get this as output from your webserver: this isbr / br / a testbr / I have confirmed this to be also an issue in the 4.0.6 release candidates, but I do not know when this all of a sudden became an issue. I'd like to know why it's creating br / tags instead of br tags :) --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11611edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid br tags
How about a big warning on the bug creation page telling the to RTFM and make sure their bug doesn't already exist. I've seen this one at least 10 times. But they are end users, they never listen. -Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, 22 June, 2001 7:07 AM To: [EMAIL PROTECTED] Subject: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid br tags ID: 11611 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Closed Status: Bogus Bug Type: Strings related Operating system: PHP Version: 4.0.5 Assigned To: Comments: Could this be even more bogus? :) Previous Comments: --- [2001-06-22 04:39:51] [EMAIL PROTECTED] It's XHTML compliant --- [2001-06-21 22:13:10] [EMAIL PROTECTED] put this into a test php file: ?php $temp = this isnna testn; printf(%s, nl2br($temp)); ? and you should get this as output from your webserver: this isbr / br / a testbr / I have confirmed this to be also an issue in the 4.0.6 release candidates, but I do not know when this all of a sudden became an issue. I'd like to know why it's creating br / tags instead of br tags :) --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11611edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid br tags
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 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid br tags
The short of it is that in HTML 4, it doesn't matter if you have a br /, BR, br, Br or bR, but in XHTML, you *must* have properly formed xml tags. br / or br/br is the only way to validly write a "br" tag in xml. So.. if the nl2br did not output br / you would not be able to use nl2br in XHTML pages. Instead of limiting the function to HTML 4 pages only.. it's now usable for HTML 4 and XHTML. Adding an optional flag would make everyone using XHTML have to change their code for nothing, since it doesn't actually matter for HTML 4. Sorry if that wasn't actually the "short of it". =) Daniel - Original Message - From: "lenar" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 22, 2001 8:18 AM Subject: Re: [PHP-DEV] Bug #11611 Updated: nl2br() outputting invalid br tags 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. lenar. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ID: 11611 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Closed Status: Bogus Bug Type: Strings related Operating system: PHP Version: 4.0.5 Assigned To: Comments: Could this be even more bogus? :) Previous Comments: -- - [2001-06-22 04:39:51] [EMAIL PROTECTED] It's XHTML compliant -- - [2001-06-21 22:13:10] [EMAIL PROTECTED] put this into a test php file: ?php $temp = "this isnna testn"; printf("%s", nl2br($temp)); ? and you should get this as output from your webserver: this isbr / br / a testbr / I have confirmed this to be also an issue in the 4.0.6 release candidates, but I do not know when this all of a sudden became an issue. I'd like to know why it's creating br / tags instead of br tags :) -- - ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11611edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]