Re: Bug #1552: show_source is extremely ugly and inefficient.

From: Date: Wed, 16 Jun 1999 23:25:02 +0000
Subject: Re: Bug #1552: show_source is extremely ugly and inefficient.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-7148@lists.php.net to get a copy of this message
At 23:06 16/06/99 , zoot@planetquake.com wrote:
From:             zoot@planetquake.com
Operating system: Linux/Red Hat 5.1
PHP version:      3.0.9
PHP Bug Type:     Feature/Change Request
Bug description: show_source is extremely ugly and inefficient. The show_source function translates all spaces into "& nbsp ;"'s, which really disturbs tables and makes pages wider. Complete ugliness, and it also wastes bandwidth by sending unnecessary information.
Disturbs tables?! show_source() does the only right thing to do when you want to reliably display whitespace, and that's using  . It has nothing to do with tables.
I realize that not replacing the spaces will result in wrapping of the source, perhaps using the <nobr> tag would help?
Using   has nothing to do with wrapping. It's simply the only right way to represent a space in HTML.
If not, then perhaps whether or not to translate the spaces should be an argument?
I don't see any reason for that. Not using &nbsp; definitely results in invalid output for any input that has spaces or tabs in it. We don't want to encourage incorrect output. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.dev (#7148) next »