]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Mon, 6 Jan 2003 22:16:30 +0000 (22:16 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 6 Jan 2003 22:16:30 +0000 (22:16 +0000)
ext/standard/string.c

index dea9dd840750b55ac68a6497810872ee9a9df3b4..3f5ae30cc08b93d07829ce8ce5f8ffb463b0a452 100644 (file)
@@ -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) {