Skip to content

Commit

Permalink
Exclude [ and ] from regex to fix EBISPOT#569
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesamcl authored Mar 14, 2022
1 parent 83709ac commit c65b87a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ols-web/src/main/resources/static/js/ols.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function goTo (url) {

$(function() {
$('p.annotation-value').each(function(i, el) {
$(el).html($(el).html().replace(/((http|https|ftp):\/\/[^\s,]+)/g, function(url) {
$(el).html($(el).html().replace(/((http|https|ftp):\/\/[^\s,\[\]]+)/g, function(url) {
console.log("Replacing URL with link: " + url);
return "<a href=\"$1\">" + escapeHtml(url) + "</a>";
}))
Expand Down Expand Up @@ -100,4 +100,4 @@ function escapeHtml(unsafe)
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}
}

0 comments on commit c65b87a

Please sign in to comment.