Fixed bug #29338 (unencoded spaces get ignored after certain tags).

This commit is contained in:
Ilia Alshanetsky 2005-05-22 16:40:06 +00:00
parent a186549ec0
commit 76c05604a6

View File

@ -71,17 +71,9 @@ ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC)
while (ptr<end) {
if (*ptr==' ') {
/* Series of spaces should be displayed as &nbsp;'s
* whereas single spaces should be displayed as a space
*/
if ((ptr+1) < end && *(ptr+1)==' ') {
do {
zend_html_putc(*ptr);
} while ((++ptr < end) && (*ptr==' '));
} else {
ZEND_PUTC(*ptr);
ptr++;
}
do {
zend_html_putc(*ptr);
} while ((++ptr < end) && (*ptr==' '));
} else {
zend_html_putc(*ptr++);
}