-
Bug
-
Resolution: Obsolete
-
Neutral
-
None
-
2.0.10
-
None
-
Magnolia 4.5.9
-
-
Yes
-
Empty show more show less
stkTemplatingFunctions.getAssetLink(Node content, String nodeDataPrefix) returns an encoded url when the data has been "selected from the DMS" via the dialog.
However, it returns a non-encoded url when the data has been "uploaded" via the dialog.
Solution:
Encode the URL when it has been "uploaded" via the dialog. See example below:
String nonEncodedUrlStringForAsset = "//localhost:8080/url/to/non/encoded/doc/my doc.pdf"; URI uri = new URI("http", nonEncodedUrlStringForAsset, null); URL url = uri.toURL();
Acceptance criteria
- caused by
-
MAGNOLIA-5290 Link referencing uploaded binary resource with special chars in filename is not encoded.
- Closed
- is related to
-
MGNLSTK-1095 Escape values for rendering, don't escape already escaped values - 4.5
- Closed