mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed bug #40637 (Regression in strip_tags() in relation so quote handling)
This commit is contained in:
parent
c667c70bdb
commit
1d08a8d157
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user