]> granicus.if.org Git - php/commitdiff
- %> without asp_tags should not be treated as inline_html but as regular
authorAndi Gutmans <andi@php.net>
Sun, 17 Dec 2000 20:10:16 +0000 (20:10 +0000)
committerAndi Gutmans <andi@php.net>
Sun, 17 Dec 2000 20:10:16 +0000 (20:10 +0000)
  tokens. Of course the parser will die with a parse error which is the
  correct behavior.

Zend/zend_language_scanner.l

index 5711b3db41b256fee87b906dd1d2f1533358538f..497cc14e21dfbbd9755b5e4634d0d1a2d8ce7c25 100644 (file)
@@ -1238,16 +1238,16 @@ ANY_CHAR (.|[\n])
 
 
 <ST_IN_SCRIPTING>"%>"([\n]|"\r\n")? {
-       zendlval->value.str.len = yyleng;
-       zendlval->type = IS_STRING;
-       HANDLE_NEWLINES(yytext,yyleng);
        if (CG(asp_tags)) {
                BEGIN(INITIAL);
+               zendlval->value.str.len = yyleng;
+               zendlval->type = IS_STRING;
                zendlval->value.str.val = yytext; /* no copying - intentional */
+               HANDLE_NEWLINES(yytext,yyleng);
                return T_CLOSE_TAG;  /* implicit ';' at php-end tag */
        } else {
-               zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
-               return T_INLINE_HTML;
+               yyless(1);
+               return yytext[0];
        }
 }