diff --git a/main/main.c b/main/main.c index 9d96ad5ee06..01be84cab40 100644 --- a/main/main.c +++ b/main/main.c @@ -400,16 +400,11 @@ PHPAPI void php_html_puts(const char *str, uint size TSRMLS_DC) case '&': smart_str_appendl(&s, "&", sizeof("&")-1); break; - case ' ': { - const char *nextchar = p; + case ' ': + while (++p < end && *p == ' '); - while (++nextchar < end && *nextchar == ' '); - - p = nextchar; - smart_str_appends(&s, " "); - continue; - } - break; + smart_str_appends(&s, " "); + continue; case '\t': smart_str_appendl(&s, "    ", sizeof("    ")-1); break;