Browse Source

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

PHP-5.1
Ilia Alshanetsky 21 years ago
parent
commit
76c05604a6
  1. 14
      Zend/zend_highlight.c

14
Zend/zend_highlight.c

@ -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++);
}

Loading…
Cancel
Save