Eric Lim commented on FOP-2688:

You are correct that square brackets should be escape to produce a valid URI.  
I was simply going by the comments in 
org.apache.fop.pdf.PDFFactory.getExternalAction, which said it supports 
filename or URI.  I guess this comment is not entirely correct after the URI 
refactor in fop 2.x

However for the parenthesis issue, I just realize that if there is an unbalance 
parenthesis, the link does not work!

7 0 obj
<< /URI (simple_%5Breport%5D_(version2.pdf)
/S /URI >>

It should be,

7 0 obj
<< /URI (simple_%5Breport%5D_\(version2.pdf)
/S /URI >>

> [PATCH] basic-link external-destination does not work for file URI with 
> parenthesis and brackets
> ------------------------------------------------------------------------------------------------
>                 Key: FOP-2688
>                 URL: https://issues.apache.org/jira/browse/FOP-2688
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: trunk
>            Reporter: Eric Lim
>         Attachments: basic-link.patch, FOP-2688(dest).pdf, 
> FOP-2688-file-paren-bracket-uri.fo, FOP-2688.fo, FOP-2688 (with patch).pdf, 
> simple_[report]_(version2).pdf
> fo:basic-link external-destinations fails when target URIs contains 
> parenthesis or square brackets.
> For square brackets, fop may throw an invalid URI exception.
> For parenthesis, fop does not escape out parenthesis for URI action.
> Parenthesis and square brackets are pretty common for file names but not for 
> URIs...

This message was sent by Atlassian JIRA

Reply via email to