From: Ilia Alshanetsky Date: Mon, 6 Jan 2003 22:16:30 +0000 (+0000) Subject: MFH X-Git-Tag: PHP_4_3_before_13561_fix~110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9afe5c129ac7ff55f150f8263e71b2d5d4c5544;p=php MFH --- diff --git a/ext/standard/string.c b/ext/standard/string.c index dea9dd8407..3f5ae30cc0 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3413,6 +3413,9 @@ PHPAPI void php_strip_tags(char *rbuf, int len, int *stateptr, char *allow, int while (i < len) { switch (c) { case '<': + if (isspace(*(p + 1))) { + goto reg_char; + } if (state == 0) { lc = '<'; state = 1; @@ -3552,6 +3555,7 @@ PHPAPI void php_strip_tags(char *rbuf, int len, int *stateptr, char *allow, int /* fall-through */ default: +reg_char: if (state == 0) { *(rp++) = c; } else if (allow && state == 1) {