sniper          Mon Feb 28 21:21:59 2005 EDT

  Added files:                 (Branch: PHP_5_0)
    /php-src/tests/basic        bug31672.phpt 

  Modified files:              
    /php-src    NEWS 
    /ZendEngine2        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.1760.2.264&r2=1.1760.2.265&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.264 php-src/NEWS:1.1760.2.265
--- php-src/NEWS:1.1760.2.264   Mon Feb 28 11:45:11 2005
+++ php-src/NEWS        Mon Feb 28 21:21:57 2005
@@ -58,6 +58,8 @@
 - Fixed bug #31683 (changes to $name in __get($name) override future 
   parameters). (Dmitry)
 - 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 #31651 (ReflectionClass::getDefaultProperties segfaults with 
arrays).
   (Marcus)
 - Fixed bug #31623 (OCILogin does not support password grace period).
http://cvs.php.net/diff.php/ZendEngine2/zend_language_scanner.l?r1=1.111.2.6&r2=1.111.2.7&ty=u
Index: ZendEngine2/zend_language_scanner.l
diff -u ZendEngine2/zend_language_scanner.l:1.111.2.6 
ZendEngine2/zend_language_scanner.l:1.111.2.7
--- ZendEngine2/zend_language_scanner.l:1.111.2.6       Sat Feb 19 09:36:07 2005
+++ ZendEngine2/zend_language_scanner.l Mon Feb 28 21:21:58 2005
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_language_scanner.l,v 1.111.2.6 2005/02/19 14:36:07 hirokawa Exp $ 
*/
+/* $Id: zend_language_scanner.l,v 1.111.2.7 2005/03/01 02:21:58 sniper Exp $ */
 
 #define yyleng SCNG(yy_leng)
 #define yytext SCNG(yy_text)
@@ -1432,11 +1432,11 @@
        yymore();
 }
 
-<ST_ONE_LINE_COMMENT>"?"|"%"|">" {
+<ST_ONE_LINE_COMMENT>"?"|"%"|">"|"<" {
        yymore();
 }
 
-<ST_ONE_LINE_COMMENT>[^\n\r?%>]+ {
+<ST_ONE_LINE_COMMENT>[^\n\r?%><]+ {
        yymore();
 }
 
@@ -1449,6 +1449,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 */
@@ -1497,7 +1506,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

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to