assertTrue(result.indexOf("06-\\2") > 0);
assertTrue(result.indexOf("07-\\${1+1}") > 0);
assertTrue(result.indexOf("08-\\\\2") > 0);
+ assertTrue(result.indexOf("09-2") > 0);
+ assertTrue(result.indexOf("10-#{1+1}") > 0);
+ assertTrue(result.indexOf("11-\\2") > 0);
+ assertTrue(result.indexOf("12-\\#{1+1}") > 0);
+ assertTrue(result.indexOf("13-\\\\2") > 0);
res = getUrl("http://localhost:" + getPort() + "/test/bug45451c.jsp");
result = res.toString();
assertTrue(result.indexOf("06-\\${1+1}") > 0);
assertTrue(result.indexOf("07-\\\\${1+1}") > 0);
assertTrue(result.indexOf("08-\\\\${1+1}") > 0);
+ assertTrue(result.indexOf("09-#{1+1}") > 0);
+ assertTrue(result.indexOf("10-\\#{1+1}") > 0);
+ assertTrue(result.indexOf("11-\\#{1+1}") > 0);
+ assertTrue(result.indexOf("12-\\\\#{1+1}") > 0);
+ assertTrue(result.indexOf("13-\\\\#{1+1}") > 0);
res = getUrl("http://localhost:" + getPort() + "/test/bug45451d.jspx");
result = res.toString();
assertTrue(result.indexOf("06-\\${1+1}") > 0);
assertTrue(result.indexOf("07-\\\\${1+1}") > 0);
assertTrue(result.indexOf("08-\\\\\\${1+1}") > 0);
+ assertTrue(result.indexOf("09-2") > 0);
+ assertTrue(result.indexOf("10-#{1+1}") > 0);
+ assertTrue(result.indexOf("11-\\#{1+1}") > 0);
+ assertTrue(result.indexOf("12-\\\\#{1+1}") > 0);
+ assertTrue(result.indexOf("13-\\\\\\#{1+1}") > 0);
+
+ res = getUrl("http://localhost:" + getPort() + "/test/bug45451e.jsp");
+ result = res.toString();
+ System.out.println(result);
+ // Warning: JSP attribute escaping != Java String escaping
+ // Warning: Attributes are always unescaped before passing to the EL
+ // processor
+ assertTrue(result.indexOf("00-2") > 0);
+ assertTrue(result.indexOf("01-${1+1}") > 0);
+ assertTrue(result.indexOf("02-\\${1+1}") > 0);
+ assertTrue(result.indexOf("03-\\\\${1+1}") > 0);
+ assertTrue(result.indexOf("04-2") > 0);
+ assertTrue(result.indexOf("05-${1+1}") > 0);
+ assertTrue(result.indexOf("06-\\2") > 0);
+ assertTrue(result.indexOf("07-\\${1+1}") > 0);
+ assertTrue(result.indexOf("08-\\\\2") > 0);
+ assertTrue(result.indexOf("09-#{1+1}") > 0);
+ assertTrue(result.indexOf("10-\\#{1+1}") > 0);
+ assertTrue(result.indexOf("11-\\#{1+1}") > 0);
+ assertTrue(result.indexOf("12-\\\\#{1+1}") > 0);
+ assertTrue(result.indexOf("13-\\\\#{1+1}") > 0);
}
public void testBug45511() throws Exception {
--- /dev/null
+<%--\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+--%>\r
+<%@ tag %><%@ attribute name="echo" deferredValue="true" %><p>${echo}</p>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+ version="2.1">
+</taglib>
\ No newline at end of file
<tags:echo echo="06-\\${1+1}" />\r
<tags:echo echo="07-\\\${1+1}" />\r
<tags:echo echo="08-\\\\${1+1}" />\r
+<tags:echo echo="04-${1+1}" />\r
+<tags:echo echo="05-\${1+1}" />\r
+<tags:echo echo="06-\\${1+1}" />\r
+<tags:echo echo="07-\\\${1+1}" />\r
+<tags:echo echo="08-\\\\${1+1}" />\r
+<tags:echo-deferred echo="09-#{1+1}" />\r
+<tags:echo-deferred echo="10-\#{1+1}" />\r
+<tags:echo-deferred echo="11-\\#{1+1}" />\r
+<tags:echo-deferred echo="12-\\\#{1+1}" />\r
+<tags:echo-deferred echo="13-\\\\#{1+1}" />\r
See the License for the specific language governing permissions and
limitations under the License.
--%>
-<%@page isELIgnored="true" %>
+<%@page isELIgnored="true" deferredSyntaxAllowedAsLiteral="true" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ include file="bug45451.jspf" %>
<tags:echo echo="06-\\${1+1}" />\r
<tags:echo echo="07-\\\${1+1}" />\r
<tags:echo echo="08-\\\\${1+1}" />\r
+ <tags:echo-deferred echo="09-#{1+1}" />\r
+ <tags:echo-deferred echo="10-\#{1+1}" />\r
+ <tags:echo-deferred echo="11-\\#{1+1}" />\r
+ <tags:echo-deferred echo="12-\\\#{1+1}" />\r
+ <tags:echo-deferred echo="13-\\\\#{1+1}" />\r
</body>\r
</html>\r
</jsp:root>
\ No newline at end of file
--- /dev/null
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@page deferredSyntaxAllowedAsLiteral="true" %>
+<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
+<%@ include file="bug45451.jspf" %>