Fixed bug #40637 (Regression in strip_tags() in relation so quote handling)

This commit is contained in:
Ilia Alshanetsky 2007-02-27 00:15:21 +00:00
parent c667c70bdb
commit 1d08a8d157

View File

@ -4263,8 +4263,12 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char *allow,
tp = ((tp-tbuf) >= PHP_TAG_BUF_SIZE ? tbuf: tp);
*(tp++) = c;
}
if (p != buf && *(p-1) != '\\') {
in_q = !in_q;
if (p != buf && *(p-1) != '\\' && (!in_q || *p == in_q)) {
if (in_q) {
in_q = 0;
} else {
in_q = *p;
}
}
break;