]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla 41572:
authorAndreas L. Delmelle <adelmelle@apache.org>
Thu, 8 Feb 2007 17:46:57 +0000 (17:46 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Thu, 8 Feb 2007 17:46:57 +0000 (17:46 +0000)
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

src/java/org/apache/fop/datatypes/URISpecification.java
status.xml

index c6f8c078c2cfeb5aca81c85ff9bfd5ca2d2f3e4d..2a3a3cba9482893704b020d13cd02fd52ddff2fe 100644 (file)
@@ -40,7 +40,7 @@ public class URISpecification {
          */
         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("\"")) {
index de8c1f99ec98d5bd2df12005274bcbb6cae32a4b..4a4ffabaec85caff2d97ad49b2f984e9f1866185 100644 (file)
@@ -28,6 +28,9 @@
 
   <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>