From: timw Date: Sun, 3 Oct 2010 06:53:15 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49998 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9c8fb9cee6f033202b31a5b08e56f008a79d7d87;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49998 Handle single quoted attributes in detection of jsp:root element in XML syntax JSP files. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1003923 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/ParserController.java b/java/org/apache/jasper/compiler/ParserController.java index d6e18e377..67f4797a7 100644 --- a/java/org/apache/jasper/compiler/ParserController.java +++ b/java/org/apache/jasper/compiler/ParserController.java @@ -598,10 +598,12 @@ class ParserController implements TagConstants { && Character.isWhitespace(root.charAt(index))) { index++; } - if (index < root.length() && root.charAt(index++) == '"' - && root.regionMatches(index, JSP_URI, 0, - JSP_URI.length())) { - return true; + if (index < root.length() + && (root.charAt(index) == '"' || root.charAt(index) == '\'')) { + index++; + if (root.regionMatches(index, JSP_URI, 0, JSP_URI.length())) { + return true; + } } } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index ac6ab063e..93a31a1de 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -244,6 +244,10 @@ 49860: Add support for trailing headers in chunked HTTP requests. (markt) + + 49987: Make jsp:root detection work with single quoted + attributes as well. (timw) +