Skip to content

Commit

Permalink
Merge pull request nissl-lab#29 from danielpalme/master
Browse files Browse the repository at this point in the history
Fix for issue 12727: Update for XSSFHyperlink.cs
  • Loading branch information
tonyqus committed Nov 27, 2014
2 parents b9ae68f + 14f09fe commit d43e72e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ooxml/XSSF/UserModel/XSSFHyperlink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ public XSSFHyperlink(CT_Hyperlink ctHyperlink, PackageRelationship hyperlinkRel)
else
{
Uri target = _externalRel.TargetUri;
_location = target.ToString();
try
{
_location = target.ToString();
}
catch (UriFormatException)
{
_location = target.OriginalString;
}

// Try to figure out the type
if (_location.StartsWith("http://") || _location.StartsWith("https://")
Expand Down

0 comments on commit d43e72e

Please sign in to comment.