cvs: php4 /ext/standard file.c
| From: | Sean Bright | Date: | Mon, 05 Mar 2001 00:20:41 +0000 |
| Subject: | cvs: php4 /ext/standard file.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4396@lists.php.net to get a copy of this message | ||
elixer Sun Mar 4 16:20:41 2001 EDT
Modified files:
/php4/ext/standard file.c
Log:
get_meta_tags now handles single quoted attributes as well as those that
are double quoted.
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.144 php4/ext/standard/file.c:1.145
--- php4/ext/standard/file.c:1.144 Sun Feb 25 22:07:17 2001
+++ php4/ext/standard/file.c Sun Mar 4 16:20:41 2001
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.144 2001/02/26 06:07:17 andi Exp $ */
+/* $Id: file.c,v 1.145 2001/03/05 00:20:41 elixer Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -2098,7 +2098,7 @@
/* Tokenizes an HTML file for get_meta_tags */
php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int *use_last_char, int
*last_char, char **data, int *datalen) {
- int ch;
+ int ch, compliment;
char buff[META_DEF_BUFSIZE + 1];
memset((void *)buff,0,META_DEF_BUFSIZE + 1);
@@ -2126,9 +2126,11 @@
case '/':
return TOK_SLASH;
break;
+ case '\'':
case '"':
+ compliment = ch;
*datalen = 0;
- while (!FP_FEOF(socketd,fp,issock) && (ch = FP_FGETC(socketd,fp,issock))
&& ch != '"') {
+ while (!FP_FEOF(socketd,fp,issock) && (ch = FP_FGETC(socketd,fp,issock))
&& ch != compliment) {
buff[(*datalen)++] = ch;
if (*datalen == META_DEF_BUFSIZE)