]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
fix FOP-2628
authorChris Bowditch <cbowditch@apache.org>
Wed, 30 Aug 2017 08:43:06 +0000 (08:43 +0000)
committerChris Bowditch <cbowditch@apache.org>
Wed, 30 Aug 2017 08:43:06 +0000 (08:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1806679 13f79535-47bb-0310-9956-ffa450edef68

fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java
fop-core/src/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java

index 7362c2ce5478656641043b83129cb604e4844bc8..b82dbee97b18bb36a25cb9b85f9b90b57d727773 100644 (file)
@@ -72,7 +72,7 @@ public final class URISpecification {
     }
 
     private static boolean isAlpha(char ch) {
-        return (ch >= 'A' && ch <= 'Z') || (ch >= 'A' && ch <= 'z');
+        return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
     }
 
     private static boolean isHexDigit(char ch) {
index f6e2b02bad6e0c7e33e134016d17965fa134f90a..159ad35fdfd2f3a07c548b893ad493dc1509b753 100644 (file)
@@ -60,6 +60,10 @@ public class URISpecificationTestCase {
 
         actual = URISpecification.escapeURI("http://localhost/test test.pdf#page=6");
         assertEquals("http://localhost/test%20test.pdf#page=6", actual);
+
+        actual = URISpecification.escapeURI("http://localhost/test^test.pdf");
+        assertEquals("http://localhost/test%5Etest.pdf", actual);
+
     }
 
 }