Skip to content

Commit

Permalink
[#2107] Don't create a source link if not a valid url
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Mar 4, 2015
1 parent 5595846 commit 465a271
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/templates/package/snippets/additional_info.html
Expand Up @@ -12,7 +12,11 @@ <h3>{{ _('Additional Info') }}</h3>
{% if pkg_dict.url %}
<tr>
<th scope="row" class="dataset-label">{{ _('Source') }}</th>
<td class="dataset-details" property="foaf:homepage">{{ h.link_to(pkg_dict.url, pkg_dict.url, rel='foaf:homepage', target='_blank') }}</td>
{% if h.is_url(pkg_dict.url) %}
<td class="dataset-details" property="foaf:homepage">{{ h.link_to(pkg_dict.url, pkg_dict.url, rel='foaf:homepage', target='_blank') }}</td>
{% else %}
<td class="dataset-details" property="foaf:homepage">{{ pkg_dict.url }}</td>
{% endif %}
</tr>
{% endif %}

Expand Down

0 comments on commit 465a271

Please sign in to comment.