iliaa Mon Jan 6 17:16:30 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/strings bug21453.phpt
Modified files: /php4/ext/standard string.c Log: MFH Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.333.2.8 php4/ext/standard/string.c:1.333.2.9 --- php4/ext/standard/string.c:1.333.2.8 Sat Jan 4 23:29:35 2003 +++ php4/ext/standard/string.c Mon Jan 6 17:16:29 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.333.2.8 2003/01/05 04:29:35 iliaa Exp $ */ +/* $Id: string.c,v 1.333.2.9 2003/01/06 22:16:29 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3413,6 +3413,9 @@ while (i < len) { switch (c) { case '<': + if (isspace(*(p + 1))) { + goto reg_char; + } if (state == 0) { lc = '<'; state = 1; @@ -3552,6 +3555,7 @@ /* fall-through */ default: +reg_char: if (state == 0) { *(rp++) = c; } else if (allow && state == 1) { Index: php4/ext/standard/tests/strings/bug21453.phpt +++ php4/ext/standard/tests/strings/bug21453.phpt --TEST-- Bug #21453 (handling of non-encoded <) --FILE-- <?php $test = " <table> <tr><td>first cell before < first cell after</td></tr> <tr><td>second cell before < second cell after</td></tr> </table>"; var_dump(strip_tags($test)); ?> --EXPECT-- string(80) " first cell before < first cell after second cell before < second cell after " -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php