Skip to content

Commit

Permalink
escapes meta tags & santitizes publisher url
Browse files Browse the repository at this point in the history
  • Loading branch information
btylerburton committed Jun 17, 2024
1 parent 76e310a commit 9f8a5fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ckanext/datagovtheme/templates/package/read_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2 class="module-heading"><img id="Publisher" src="/images/publisher.png" style
{% endblock %}
{% block publisher_content %}
<p class="module-content">
<a href="/dataset?publisher={{ h.get_pkg_dict_extra(c.pkg_dict, 'publisher') }}" title="{{ _('publsher') }}">{{ h.get_pkg_dict_extra(c.pkg_dict, 'publisher') }}</a>
<a href="/dataset?publisher={{ h.sanitize_url(h.get_pkg_dict_extra(c.pkg_dict, 'publisher')) }}" title="{{ _('publisher') }}">{{ h.get_pkg_dict_extra(c.pkg_dict, 'publisher') }}</a>
</p>
{% endblock %}
</section>
Expand Down
4 changes: 2 additions & 2 deletions ckanext/datagovtheme/templates/snippets/link_preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://data.gov">
<meta property="og:type" content="website">
<meta property="og:title" content="{{ organization }} - {{ dataset }}">
<meta property="og:description" content="{{ notes }}">
<meta property="og:title" content="{{ h.literal.escape(organization) }} - {{ h.literal.escape(dataset) }}">
<meta property="og:description" content="{{ h.literal.escape(notes) }}">
<meta property="og:image" content="{{ img }}">

<!-- Twitter Meta Tags -->
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="ckanext-datagovtheme",
version="0.2.22",
version="0.2.23",
description="CKAN Extension to manage data.gov theme",
long_description=long_description,
classifiers=[
Expand Down

0 comments on commit 9f8a5fb

Please sign in to comment.