diff --git a/app/assets/javascripts/related_tag.js b/app/assets/javascripts/related_tag.js index e2e575ae9..12ed65837 100644 --- a/app/assets/javascripts/related_tag.js +++ b/app/assets/javascripts/related_tag.js @@ -222,7 +222,21 @@ $("
  • ").append($link) ); } else { - $ul.append($("
  • ").text(tag[0])); + var text = tag[0]; + if (text.match(/^ http/)) { + text = text.substring(1, 1000); + var $url = $(""); + $url.text("open"); + $url.attr("href", text); + $url.attr("target", "_blank"); + var $li = $("
  • "); + $li.append(text + " ["); + $li.append($url); + $li.append("]"); + $ul.append($li); + } else { + $ul.append($("
  • ").text(text)); + } } });