https://issues.apache.org/bugzilla/show_bug.cgi?id=56612

            Bug ID: 56612
           Summary: Jasper is not able to parse two consecutive escaped
                    single quotes in EL
           Product: Tomcat 8
           Version: 8.0.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: pavel.ho...@orchitech.cz

JSP compiler breaks when it encounters two consecutive escaped single quotes in
EL.

Example JSP:

    ${'\'\''}

Expected result:

    ''

Result:

    org.apache.jasper.JasperException: /test.jsp (line: 1, column: 3)
Unterminated ${ tag
   
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
   
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:276)
   
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:92)
    org.apache.jasper.compiler.Parser.parseELExpression(Parser.java:760)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1473)
    org.apache.jasper.compiler.Parser.parse(Parser.java:139)
   
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:229)
   
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:200)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:375)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:355)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:342)
   
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Bug is also present in Tomcat 7.0.53.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to