- Session:
. Fixed bug #71122 (Session GC may not remove obsolete session data). (Yasuo)
+- Standard:
+ . Fixed bug #70720 (strip_tags improper php code parsing). (Julien)
+
17 Dec 2015, PHP 5.6.17
- Core:
switch (state) {
case 1: /* HTML/XML */
lc = '>';
+ if (*(p -1) == '-') {
+ break;
+ }
in_q = state = 0;
if (allow) {
if (tp - tbuf >= PHP_TAG_BUF_SIZE) {
* state == 2 (PHP). Switch back to HTML.
*/
- if (state == 2 && p > buf+2 && strncasecmp(p-2, "xm", 2) == 0) {
+ if (state == 2 && p > buf+2 && strncasecmp(p-4, "<?xm", 4) == 0) {
state = 1;
break;
}
--- /dev/null
+--TEST--
+Bug #70720 (strip_tags() doesnt handle "xml" correctly)
+--FILE--
+<?php
+var_dump(strip_tags('<?php $dom->test(); ?> this is a test'));
+var_dump(strip_tags('<?php $xml->test(); ?> this is a test'));
+var_dump(strip_tags('<?xml $xml->test(); ?> this is a test'));
+?>
+--EXPECTF--
+string(15) " this is a test"
+string(15) " this is a test"
+string(15) " this is a test"
\ No newline at end of file