Lines 25-30
Link Here
|
25 |
|
25 |
|
26 |
import org.apache.fop.util.XMLUtil; |
26 |
import org.apache.fop.util.XMLUtil; |
27 |
|
27 |
|
|
|
28 |
import java.io.UnsupportedEncodingException; |
29 |
|
28 |
/** |
30 |
/** |
29 |
* Action class which represents a "URI" action, i.e. an action that will call up an external |
31 |
* Action class which represents a "URI" action, i.e. an action that will call up an external |
30 |
* resource identified by a URI. |
32 |
* resource identified by a URI. |
Lines 43-49
Link Here
|
43 |
if (uri == null) { |
45 |
if (uri == null) { |
44 |
throw new NullPointerException("uri must not be null"); |
46 |
throw new NullPointerException("uri must not be null"); |
45 |
} |
47 |
} |
46 |
this.uri = uri; |
48 |
try { |
|
|
49 |
this.uri = java.net.URLDecoder.decode(uri, "UTF-8"); |
50 |
} catch (UnsupportedEncodingException uee) { |
51 |
assert false; |
|
|
52 |
this.uri = uri; |
53 |
} |
54 |
|
47 |
this.newWindow = newWindow; |
55 |
this.newWindow = newWindow; |
48 |
} |
56 |
} |
49 |
|
57 |
|
Lines 92-98
Link Here
|
92 |
if (hasID()) { |
100 |
if (hasID()) { |
93 |
atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID()); |
101 |
atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID()); |
94 |
} |
102 |
} |
95 |
atts.addAttribute(null, "uri", "uri", XMLUtil.CDATA, getURI()); |
103 |
String encodedURI; |
|
|
104 |
try { |
105 |
encodedURI = java.net.URLEncoder.encode(getURI(), "UTF-8"); |
106 |
} catch (UnsupportedEncodingException uee) { |
107 |
assert false; |
108 |
encodedURI = getURI(); |
109 |
} |
110 |
atts.addAttribute(null, "uri", "uri", XMLUtil.CDATA, encodedURI); |
96 |
if (isNewWindow()) { |
111 |
if (isNewWindow()) { |
97 |
atts.addAttribute(null, "show-destination", "show-destination", XMLUtil.CDATA, "new"); |
112 |
atts.addAttribute(null, "show-destination", "show-destination", XMLUtil.CDATA, "new"); |
98 |
} |
113 |
} |