com php-src: Revert "Fix #70720": ext/standard/string.c ext/standard/tests/strings/bug70720.phpt
| From: | Anatol Belski | Date: | Fri, 29 Jan 2016 11:41:43 +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-90789@lists.php.net to get a copy of this message | ||
Commit: 47af41b785f5b669b755a843ed081945f17989a3
Author: Anatol Belski <ab@php.net> Fri, 29 Jan 2016 12:41:43 +0100
Parents: e92abf850ea936e7d7ddd29f644f15eeb3c68f10
Branches: PHP-7.0.3
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=47af41b785f5b669b755a843ed081945f17989a3
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 3ac8dc1..23003db 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -4798,9 +4798,6 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, int *stateptr, const
cha
switch (state) {
case 1: /* HTML/XML */
lc = '>';
- if (*(p -1) == '-') {
- break;
- }
in_q = state = 0;
if (allow) {
if (tp - tbuf >= PHP_TAG_BUF_SIZE) {
@@ -4930,7 +4927,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, int *stateptr, const
cha
* 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