cvs: php-src(PHP_5_2) /ext/standard string.c
| From: | Ilia Alshanetsky | Date: | Tue, 27 Feb 2007 00:15:21 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/standard string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-43313@lists.php.net to get a copy of this message | ||
iliaa Tue Feb 27 00:15:21 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard string.c
Log:
Fixed bug #40637 (Regression in strip_tags() in relation so quote handling)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.42&r2=1.445.2.14.2.43&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.42 php-src/ext/standard/string.c:1.445.2.14.2.43
--- php-src/ext/standard/string.c:1.445.2.14.2.42 Sat Feb 24 02:17:27 2007
+++ php-src/ext/standard/string.c Tue Feb 27 00:15:21 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.445.2.14.2.42 2007/02/24 02:17:27 helly Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.43 2007/02/27 00:15:21 iliaa Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -4263,8 +4263,12 @@
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;