Skip to content

Commit

Permalink
Return HTML link instead of plain IRI kasei#54
Browse files Browse the repository at this point in the history
  • Loading branch information
Varadinsky committed Jan 29, 2016
1 parent bcc5e07 commit b4294fd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/AtteanX/Serializer/SPARQLHTML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ Serializes the L<Attean::API::Term> object as HTML.
s/&/&amp;/g;
s/</&lt;/g;
}
my $html = $uri;
my $html = qq[<a href="${uri}">$uri</a>];

if (my $map = $self->namespaces) {
my $abr = $map->abbreviate($html);
my $abr = $map->abbreviate($uri);

if ($abr) {
return qq[<a href="${html}">$abr</a>];
return qq[<a href="${uri}">$abr</a>];
} else {
return $html;
}
Expand All @@ -160,7 +160,6 @@ Serializes the L<Attean::API::Term> object as HTML.
# if ($link) {
# $html = qq[<a href="${uri}">$html</a>];
# }
return $html;
} elsif ($node->does('Attean::API::Literal')) {
my $html = $node->value;
for ($html) {
Expand Down

0 comments on commit b4294fd

Please sign in to comment.