URIs were not properly parsed if they contain bracketed part(s)
Fix suggested by Erwin Tratar.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@504980
13f79535-47bb-0310-9956-
ffa450edef68
*/
href = href.trim();
if (href.startsWith("url(") && (href.indexOf(")") != -1)) {
- href = href.substring(4, href.indexOf(")")).trim();
+ href = href.substring(4, href.lastIndexOf(")")).trim();
if (href.startsWith("'") && href.endsWith("'")) {
href = href.substring(1, href.length() - 1);
} else if (href.startsWith("\"") && href.endsWith("\"")) {
<changes>
<release version="FOP Trunk">
+ <action context="Code" dev="AD" type="fix" fixes-bug="41572" due-to="Erwin Tratar">
+ Fix parsing 'url(...)' when the URL itself contains a bracketed part.
+ </action>
<action context="Code" dev="JM" type="add">
Support for GIF images in RTF output (RTF handler, only. Does not affect the RTF library.)
</action>