summaryrefslogtreecommitdiff
path: root/main/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.c')
-rw-r--r--main/main.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/main/main.c b/main/main.c
index 9d96ad5ee0..01be84cab4 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, "&nbsp;");
- continue;
- }
- break;
+ smart_str_appends(&s, "&nbsp;");
+ continue;
case '\t':
smart_str_appendl(&s, "&nbsp;&nbsp;&nbsp;&nbsp;", sizeof("&nbsp;&nbsp;&nbsp;&nbsp;")-1);
break;