From ad8ce8d99dcb45d50a058b423668981bb9aa7fc9 Mon Sep 17 00:00:00 2001 From: Chris Bowditch Date: Wed, 30 Aug 2017 08:43:06 +0000 Subject: [PATCH] fix FOP-2628 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1806679 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/fop/datatypes/URISpecification.java | 2 +- .../org/apache/fop/datatypes/URISpecificationTestCase.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java b/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java index 7362c2ce5..b82dbee97 100644 --- a/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java +++ b/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java @@ -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) { diff --git a/fop-core/src/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java b/fop-core/src/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java index f6e2b02ba..159ad35fd 100644 --- a/fop-core/src/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java @@ -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); + } } -- 2.39.5