From d78da4769ad017e5adb3360e3a0ff8b9069c9152 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 27 Sep 2014 11:02:15 +0200 Subject: [PATCH] Fixed post source being a link when it shouldn't --- public_html/templates/post.tpl | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/public_html/templates/post.tpl b/public_html/templates/post.tpl index 1352d379..bba3e90f 100644 --- a/public_html/templates/post.tpl +++ b/public_html/templates/post.tpl @@ -84,12 +84,17 @@ <% } %> <% if (post.source) { %> -
  • - Source: <%= post.source.trim() %> - -
  • +
  • <% var link = post.source.match(/^(\/\/|https?:\/\/)/); %>Source: <% if (link) { %><% } %><%= post.source.trim() %><% if (link) { %><% } %>
  • <% } %>