]> granicus.if.org Git - php/commitdiff
Fix strip_tags to not strip a lone > character
authorRasmus Lerdorf <rasmus@php.net>
Fri, 2 Feb 2001 13:47:02 +0000 (13:47 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Fri, 2 Feb 2001 13:47:02 +0000 (13:47 +0000)
@ Fix strip_tags to not strip a lone > character (Rasmus)

ext/standard/string.c

index 321183103ef5e465647ade1039dd9bf8655f3f1b..6b81ee03ab3b2b6b3007569d571e741452347e0e 100644 (file)
@@ -2800,6 +2800,8 @@ PHPAPI void php_strip_tags(char *rbuf, int len, int state, char *allow, int allo
                                                state = 0;
                                                tp = tbuf;
                                        }
+                               } else {
+                                       *(rp++) = c;
                                }
                                break;