similar to bug 33535: if files in a directroy contain "'" or "&" symbols, generted XML is not valid and XSLT style sheet cannot be applied to render the directory listing. Cause: DefaultServelt considers "'" as a valid character on URLEncoder.DEFAULT, renderXML surronds attributes with ' symbol, and thus XML generated by renderXML may contain invalid entry with url attribute like this <entry urlPath='file's name.txt' />
*** This bug has been marked as a duplicate of bug 33535 ***
The bug may be similar to bug 33535, but bug 33535 says only about & in the names of the files. My bug report says that there are can be symbols that are not valid for XML, such as symbol "'". And I have a simple solution to that which I was goign to provide as a fix for this bug.
(In reply to webmascon from comment #2) > The bug may be similar to bug 33535, but bug 33535 says only about & in the > names of the files. My bug report says that there are can be symbols that > are not valid for XML, such as symbol "'". IMO, Those reports are all about handling file names that contain special characters which lead XML is invalided. > And I have a simple solution to that which I was goign to provide as a fix for this bug. Great.
created pull request: https://github.com/apache/tomcat/pull/621
Fixed in: - 11.0.x for 11.0.0-M7 onwards - 10.1.x for 10.1.10 onwards - 9.0.x for 9.0.76 onwards - 8.5.x for 8.5.90 onwards
thanks!