Bug 55207

Summary: In XML syntax, jsp:text does not error on sub-elements from other namespaces
Product: Tomcat 8 Reporter: Jeremy Boynes <jboynes>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: gavrilovetsden
Priority: P2    
Version: 8.0.x-trunk   
Target Milestone: ----   
Hardware: PC   
OS: Mac OS X 10.4   
Attachments: patch to reject on any element inside <jsp:text>
patch to reject on any element inside <jsp:text>
patch to reject on any element inside <jsp:text>

Description Jeremy Boynes 2013-07-07 01:11:30 UTC
Created attachment 30557 [details]
patch to reject on any element inside <jsp:text>

JspDocumentParser does check for sub-elements within a jsp:text element but only fails if they are from the jsp namespace
Comment 1 Jeremy Boynes 2013-07-07 01:13:33 UTC
Created attachment 30558 [details]
patch to reject on any element inside <jsp:text>
Comment 2 Jeremy Boynes 2013-07-07 01:59:38 UTC
Created attachment 30559 [details]
patch to reject on any element inside <jsp:text>

There is an additional problem here in that the check is assuming the name of the <jsp:text> node is "jsp:text" - it does not allow for the case where a different prefix is being used. This applies to the current implementation as well where nested <foo:text><foo:text> will not error if foo: is the JSP namespace.

Updated the check to use the type of the parent Node rather than the XML
Comment 3 Mark Thomas 2013-07-10 19:40:51 UTC
Thanks for the patch. It has been applied to trunk and 7.0.x and will be included in 7.0.43 onwards.