aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/fop/apps/FOUserAgent.java4
-rw-r--r--src/java/org/apache/fop/apps/FopFactory.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java
index 9a052b155..7fc706708 100644
--- a/src/java/org/apache/fop/apps/FOUserAgent.java
+++ b/src/java/org/apache/fop/apps/FOUserAgent.java
@@ -410,7 +410,9 @@ public class FOUserAgent {
*/
public Source resolveURI(String uri, String base) {
Source source = null;
- if (uriResolver != null) {
+ //RFC 2397 data URLs don't need to be resolved, just decode them.
+ boolean bypassURIResolution = uri.startsWith("data:");
+ if (!bypassURIResolution && uriResolver != null) {
try {
source = uriResolver.resolve(uri, base);
} catch (TransformerException te) {
diff --git a/src/java/org/apache/fop/apps/FopFactory.java b/src/java/org/apache/fop/apps/FopFactory.java
index cd1f4c4d7..a0acb36a3 100644
--- a/src/java/org/apache/fop/apps/FopFactory.java
+++ b/src/java/org/apache/fop/apps/FopFactory.java
@@ -571,7 +571,9 @@ public class FopFactory {
*/
public Source resolveURI(String uri, String base) {
Source source = null;
- if (uriResolver != null) {
+ //RFC 2397 data URLs don't need to be resolved, just decode them.
+ boolean bypassURIResolution = uri.startsWith("data:");
+ if (!bypassURIResolution && uriResolver != null) {
try {
source = uriResolver.resolve(uri, base);
} catch (TransformerException te) {