Index: src/java/org/apache/fop/render/intermediate/extensions/URIAction.java =================================================================== --- src/java/org/apache/fop/render/intermediate/extensions/URIAction.java (revision 746664) +++ src/java/org/apache/fop/render/intermediate/extensions/URIAction.java Tue Jul 21 11:58:30 CEST 2009 @@ -25,6 +25,8 @@ import org.apache.fop.util.XMLUtil; +import java.io.UnsupportedEncodingException; + /** * Action class which represents a "URI" action, i.e. an action that will call up an external * resource identified by a URI. @@ -43,7 +45,13 @@ if (uri == null) { throw new NullPointerException("uri must not be null"); } + try { + this.uri = java.net.URLDecoder.decode(uri, "UTF-8"); + } catch (UnsupportedEncodingException uee) { + assert false; - this.uri = uri; + this.uri = uri; + } + this.newWindow = newWindow; } @@ -92,7 +100,14 @@ if (hasID()) { atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID()); } - atts.addAttribute(null, "uri", "uri", XMLUtil.CDATA, getURI()); + String encodedURI; + try { + encodedURI = java.net.URLEncoder.encode(getURI(), "UTF-8"); + } catch (UnsupportedEncodingException uee) { + assert false; + encodedURI = getURI(); + } + atts.addAttribute(null, "uri", "uri", XMLUtil.CDATA, encodedURI); if (isNewWindow()) { atts.addAttribute(null, "show-destination", "show-destination", XMLUtil.CDATA, "new"); }