Fixed post source being a link when it shouldn't

This commit is contained in:
Marcin Kurczewski 2014-09-27 11:02:15 +02:00
parent 3da8d2c233
commit d78da4769a

View file

@ -84,12 +84,17 @@
<% } %>
<% if (post.source) { %>
<li>
Source:&nbsp;<!--
<li><!--
--><% var link = post.source.match(/^(\/\/|https?:\/\/)/); %><!--
-->Source:&nbsp;<!--
--><% if (link) { %><!--
--><a href="<%= post.source %>"><!--
--><%= post.source.trim() %>
</a>
</li>
--><% } %><!--
--><%= post.source.trim() %><!--
--><% if (link) { %><!--
--></a><!--
--><% } %><!--
--></li>
<% } %>
</ul>