diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-02-27 00:15:21 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-02-27 00:15:21 +0000 |
commit | 1d08a8d157fe76c98abec7664f9eeddf654ff546 (patch) | |
tree | c7d9cf4078fdd678c212e08914dddd8872d257f4 /ext/standard/string.c | |
parent | c667c70bdb10e1c0ed504a922ade3c53fca7c5d9 (diff) | |
download | php-git-1d08a8d157fe76c98abec7664f9eeddf654ff546.tar.gz |
Fixed bug #40637 (Regression in strip_tags() in relation so quote handling)
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r-- | ext/standard/string.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index a82aa0c34f..c65da88087 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -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; |