Skip to content
Permalink
Browse files

improve rendering of possible DOI links

  • Loading branch information...
phluid61 committed Sep 4, 2015
1 parent 7303e0c commit c11e3bbfb8007b39ce6032caf51a28029b3221f1
Showing with 4 additions and 4 deletions.
  1. +4 −4 perl_lib/EPrints/Extras.pm
@@ -304,9 +304,9 @@ sub render_possible_doi

$value = "" unless defined $value;
if( $value =~ m!^
(?:http://dx\.doi\.org/)? # add this again later anyway
(?:doi:?\s*)? # don't need any namespace stuff
(10(\.[^./]+)+/.+) # the actual DOI => $1
(?:http://(?:dx\.)?doi\.org/)? # add this again later anyway
(?:doi:?\s*)? # don't need any namespace stuff
(10(\.[^./]+)+/.+) # the actual DOI => $1
!ix )
{
# The only part we care about is the actual DOI.
@@ -319,7 +319,7 @@ sub render_possible_doi
return $session->make_text( $value );
}

my $url = "http://dx.doi.org/$value";
my $url = "http://doi.org/$value";
my $link = $session->render_link( $url, "_blank" );
$link->appendChild( $session->make_text( $value ) );
return $link;

0 comments on commit c11e3bb

Please sign in to comment.
You can’t perform that action at this time.