ASF Bugzilla – Attachment 26109 Details for
Bug 49998
ParserController.hasJspRoot() does not detect JSP as using XML syntax if <jsp:root> namespace declaration uses ' delimiters instead of "
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to allow single quotes to be used in jsp namespace declarations
apache-6-allow-single-quotes.patch (text/plain), 1.38 KB, created by
brian.weisleder
on 2010-10-01 00:30:53 UTC
(
hide
)
Description:
Patch to allow single quotes to be used in jsp namespace declarations
Filename:
MIME Type:
Creator:
brian.weisleder
Created:
2010-10-01 00:30:53 UTC
Size:
1.38 KB
patch
obsolete
>Index: java/org/apache/jasper/compiler/ParserController.java >=================================================================== >--- java/org/apache/jasper/compiler/ParserController.java (revision ) >+++ java/org/apache/jasper/compiler/ParserController.java (revision ) >@@ -557,7 +557,7 @@ > return fileName; > } > >- /* >+ /** > * Checks to see if the given page contains, as its first element, a <root> > * element whose prefix is bound to the JSP namespace, as in: > * >@@ -608,16 +608,17 @@ > } > if (index < root.length() && root.charAt(index) == '=') { > index++; >- while (index < root.length() >- && Character.isWhitespace(root.charAt(index))) { >+ while (index < root.length() && Character.isWhitespace(root.charAt(index))) { > index++; > } >- if (index < root.length() && root.charAt(index++) == '"' >- && root.regionMatches(index, JSP_URI, 0, >- JSP_URI.length())) { >+ >+ if (index < root.length() && (root.charAt(index) == '"' || root.charAt(index) == '\'')) { >+ index++; >+ if (root.regionMatches(index, JSP_URI, 0, JSP_URI.length())) { >- return true; >- } >- } >+ return true; >+ } >+ } >+ } > > return false; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 49998
: 26109