From d9afe5c129ac7ff55f150f8263e71b2d5d4c5544 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 6 Jan 2003 22:16:30 +0000 Subject: [PATCH] MFH --- ext/standard/string.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.50.1