Annotation of embedaddon/php/ext/standard/tests/strings/bug46578.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #46578 (strip_tags() does not honor end-of-comment when it encounters a single quote)
! 3: --FILE--
! 4: <?php
! 5:
! 6: var_dump(strip_tags('<!-- testing I\'ve been to mars -->foobar'));
! 7:
! 8: var_dump(strip_tags('<a alt="foobar">foo<!-- foo! --></a>bar'));
! 9:
! 10: var_dump(strip_tags('<a alt="foobar"/>foo<?= foo! /* <!-- "cool" --> */ ?>bar'));
! 11:
! 12: var_dump(strip_tags('< ax'));
! 13:
! 14: var_dump(strip_tags('<! a>'));
! 15:
! 16: var_dump(strip_tags('<? ax'));
! 17:
! 18: ?>
! 19: --EXPECTF--
! 20: %string|unicode%(6) "foobar"
! 21: %string|unicode%(6) "foobar"
! 22: %string|unicode%(6) "foobar"
! 23: %string|unicode%(4) "< ax"
! 24: %string|unicode%(0) ""
! 25: %string|unicode%(0) ""
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>