cvs: Zend(PHP_4_3) / zend_language_scanner.l php-src NEWS php-src/tests/basic bug31672.phpt
| From: | Jani Taskinen | Date: | Tue, 01 Mar 2005 02:22:43 +0000 |
| Subject: | cvs: Zend(PHP_4_3) / zend_language_scanner.l php-src NEWS php-src/tests/basic bug31672.phpt | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3448@lists.php.net to get a copy of this message | ||
sniper Mon Feb 28 21:22:43 2005 EDT
Added files: (Branch: PHP_4_3)
/php-src/tests/basic bug31672.phpt
Modified files:
/php-src NEWS
/Zend zend_language_scanner.l
Log:
MFH: - Fixed bug #31672 (</script> not considered closing tag if
MFH: preceded by one-line comment
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.845&r2=1.1247.2.846&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.845 php-src/NEWS:1.1247.2.846
--- php-src/NEWS:1.1247.2.845 Fri Feb 25 17:13:37 2005
+++ php-src/NEWS Mon Feb 28 21:22:41 2005
@@ -29,6 +29,8 @@
- Fixed bug #31684 (dio_tcsetattr(): misconfigured termios settings).
(elod at itfais dot com)
- Fixed bug #31699 (unserialize() float problem on non-English locales). (Ilia)
+- Fixed bug #31672 (</script> not used as closing tag after one-line comment).
+ (Jani)
- Fixed bug #31623 (OCILogin does not support password grace period).
(daniel dot beet at accuratesoftware dot com, Tony)
- Fixed bug #31580 (fgetcsv() problematic with "" escape sequences). (Ilia)
http://cvs.php.net/diff.php/Zend/zend_language_scanner.l?r1=1.54.2.30&r2=1.54.2.31&ty=u
Index: Zend/zend_language_scanner.l
diff -u Zend/zend_language_scanner.l:1.54.2.30 Zend/zend_language_scanner.l:1.54.2.31
--- Zend/zend_language_scanner.l:1.54.2.30 Mon Jan 17 12:22:22 2005
+++ Zend/zend_language_scanner.l Mon Feb 28 21:22:42 2005
@@ -1360,11 +1360,11 @@
yymore();
}
-<ST_ONE_LINE_COMMENT>"?"|"%"|">" {
+<ST_ONE_LINE_COMMENT>"?"|"%"|">"|"<" {
yymore();
}
-<ST_ONE_LINE_COMMENT>[^\n\r?%>]+ {
+<ST_ONE_LINE_COMMENT>[^\n\r?%><]+ {
yymore();
}
@@ -1377,6 +1377,15 @@
return T_COMMENT;
}
+<ST_ONE_LINE_COMMENT>"</script>" {
+ zendlval->value.str.val = yytext; /* no copying - intentional */
+ zendlval->value.str.len = yyleng;
+ zendlval->type = IS_STRING;
+ yyless(yyleng-9);
+ BEGIN(ST_IN_SCRIPTING);
+ return T_COMMENT;
+}
+
<ST_ONE_LINE_COMMENT>"?>"|"%>" {
if (CG(asp_tags) || yytext[yyleng-2] != '%') { /* asp comment? */
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1411,7 +1420,7 @@
yymore();
}
-<ST_IN_SCRIPTING>("?>"|"</script"{WHITESPACE}*">"){NEWLINE}?
{
+<ST_IN_SCRIPTING>("?>"|"</script>"){NEWLINE}? {
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
http://cvs.php.net/co.php/php-src/tests/basic/bug31672.phpt?r=1.1&p=1
Index: php-src/tests/basic/bug31672.phpt
+++ php-src/tests/basic/bug31672.phpt