tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Parser.java
Date Tue, 23 Sep 2003 20:47:23 GMT
kinman      2003/09/23 13:47:23

  Modified:    jasper2/src/share/org/apache/jasper/compiler Parser.java
  Log:
  - Fix bug: \<%foo%> in template text hides expression.
  
  Revision  Changes    Path
  1.82      +10 -7     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- Parser.java	23 Sep 2003 00:08:22 -0000	1.81
  +++ Parser.java	23 Sep 2003 20:47:23 -0000	1.82
  @@ -1486,10 +1486,13 @@
   		    ttext.write('\\');
   		    break;
   		}
  -		ch = reader.nextChar();
  -		// Looking for \% or \$
  -		if (ch != '%' && ch != '$') {
  -		    ttext.write('\\');
  +                char next = (char)reader.peekChar();
  +                // Looking for \% or \$
  +                // TODO: only recognize \$ if isELIgnored is false, but since
  +                // it can be set in a page directive, it cannot be determined
  +                // here.  Argh!
  +                if (next == '%' || next == '$') {
  +                    ch = reader.nextChar();
                   }
   	    }
   	    ttext.write(ch);
  
  
  

Mime
View raw message