com php-src: Revert "Fix #70720": ext/standard/string.c ext/standard/tests/strings/bug70720.phpt
| From: | JulienPauli | Date: | Tue, 02 Feb 2016 17:32:38 +0000 |
| Subject: | com php-src: Revert "Fix #70720": ext/standard/string.c ext/standard/tests/strings/bug70720.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90915@lists.php.net to get a copy of this message | ||
Commit: 15b1efeba88563a30978f7cafa15abd7cd85bc9e
Author: Julien Pauli <jpauli@php.net> Tue, 2 Feb 2016 18:32:38 +0100
Parents: 813ecfb49fc59d8fd74e4982ed2c9ff01e32b531
Branches: PHP-5.6.18
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=15b1efeba88563a30978f7cafa15abd7cd85bc9e
Log:
Revert "Fix #70720"
This reverts commit ff7ed9021cd72a7f82dd4301cdc266afdff458ad.
Bugs:
https://bugs.php.net/70720
Changed paths:
M ext/standard/string.c
D ext/standard/tests/strings/bug70720.phpt
Diff:
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 5889b87..56b748a 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -4689,9 +4689,6 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char
*allow,
switch (state) {
case 1: /* HTML/XML */
lc = '>';
- if (*(p -1) == '-') {
- break;
- }
in_q = state = 0;
if (allow) {
if (tp - tbuf >= PHP_TAG_BUF_SIZE) {
@@ -4821,7 +4818,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char
*allow,
* state == 2 (PHP). Switch back to HTML.
*/
- if (state == 2 && p > buf+2 && strncasecmp(p-4, "<?xm", 4) ==
0) {
+ if (state == 2 && p > buf+2 && strncasecmp(p-2, "xm", 2) == 0) {
state = 1;
break;
}
diff --git a/ext/standard/tests/strings/bug70720.phpt b/ext/standard/tests/strings/bug70720.phpt
deleted file mode 100644
index edf6008..0000000
--- a/ext/standard/tests/strings/bug70720.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---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