Affects Version/s: 1.13
Fix Version/s: None
Component/s: SVG DOM
No fix was applied to ParsedURLJarProtocolHandler, therefore the issue still reproduces with SVG files inside of JAR files.
Steps to reproduce
1. Embed a SVG file with an anchor clip path inside a JAR file.
2. Parse the document:
3. Transcode it to PDF using FOP:
The PDF file is generated as it would be if the document URL was a not a JAR url.
The anchor URL incorrectly resolves to:
Note the missing SVG file name.
batik-bridge then attempts to load an SVG document with this URL, resulting in a TranscoderException caused by a "Premature end of file" EOFException.
1. Make a copy of ParsedURLJarProtocolHandler. The copy must still extend ParsedURLDefaultProtocolHandler.
2. At the beginning of parseURL, return super.parseUrl(baseURL, urlStr) if the urlStr starts with "#".
3. Create META-INF/services/org.apache.batik.util.ParsedURLProtocolHandler containing the full class name of the patched class.