summaryrefslogtreecommitdiff
path: root/ext/standard/string.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-07-11 12:16:06 +0000
committerFelipe Pena <felipe@php.net>2008-07-11 12:16:06 +0000
commitfc2cf6e19f6085b286a3f0ba672cca7b3311f19e (patch)
treef319cedfdacca92ac91e07d2ec9f6d11dc44e202 /ext/standard/string.c
parentb2f1de8924a015a850af5ceecefff9089b5d7a71 (diff)
downloadphp-git-fc2cf6e19f6085b286a3f0ba672cca7b3311f19e.tar.gz
- Fixed bug #45485 (strip_tags and <?XML tag)
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r--ext/standard/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index f4bb26005d..54f680a00d 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -4519,12 +4519,13 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char *allow,
/* fall-through */
case 'l':
+ case 'L':
/* swm: If we encounter '<?xml' then we shouldn't be in
* state == 2 (PHP). Switch back to HTML.
*/
- if (state == 2 && p > buf+2 && *(p-1) == 'm' && *(p-2) == 'x') {
+ if (state == 2 && p > buf+2 && strncasecmp(p-2, "xm", 2) == 0) {
state = 1;
break;
}