Skip to content

Commit

Permalink
escape the dot in the hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
kf8a committed Jun 7, 2024
1 parent 1ebfeca commit 82a5108
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/citations_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ def publication_url(citation)
end

def normalize_doi(doi)
if doi.match?(/dx.doi.org/)
if doi.match?(/dx\.doi\.org/)
doi
elsif doi.match?(/^doi.org/)
elsif doi.match?(/^doi\.org/)
'http://' + doi
elsif doi.match?(/^http/)
doi
Expand Down

0 comments on commit 82a5108

Please sign in to comment.