poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53734] Hyperlink parser does not accept URLs of type "javascript://"
Date Fri, 26 Oct 2012 11:40:26 GMT

Yegor Kozlov <yegor@dinom.ru> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Yegor Kozlov <yegor@dinom.ru> ---
Fixed in r1402470. Please try with the latest build fro trunk.

Strictly speaking, MS Office generates a invalid OPC package because
"javascript://" is not a valid URI.
On the low level, POI uses java.net.URI to parse package relationships and this
is where the exception comes from.
The problem can be narrowed down to a single line:

new java.net.URI("javascript://");

which failes with "java.net.URISyntaxException: Expected authority at index 13:
javascript://" . 

The URI class is defined by RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt) and
it requires that double slash must be immediately followed by the authority

I added a simple workaround: append a trailing slash if authority is missing,
e.g. "javascript:///". Java can parse such URIs without any problems.


You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message