Revert removal of "safe" template tag from blog/news headlines.

Conservancy use HTML entities in their titles.
This commit is contained in:
Ben Sturmfels 2021-12-18 08:56:14 +11:00
parent 3227e4ce9f
commit 1c38ad0179
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
8 changed files with 10 additions and 10 deletions

View file

@ -6,7 +6,7 @@
{% include "opengraph_urllist_partial.html" with property='video' urls=object.get_one_video_url %}
{% endblock %}
{% block subtitle %}{{ object.headline|striptags }} - Conservancy Blog - {% endblock %}
{% block subtitle %}{{ object.headline|striptags|safe }} - Conservancy Blog - {% endblock %}
{% block content %}
<div class="breadcrumbs">

View file

@ -18,7 +18,7 @@ This partial accepts these optional parameters:
<{{ htag|default:"h3" }} class="clear"
>{% if show|default:"body" != "body" %}<a href="{{ entry.get_absolute_url }}"
>{% endif %}{{ entry.headline }}{% if show|default:"body" != "body" %}</a>{% endif %}</{{ htag|default:"h3" }}>
>{% endif %}{{ entry.headline|safe }}{% if show|default:"body" != "body" %}</a>{% endif %}</{{ htag|default:"h3" }}>
{% if show != "headline" %}
<p class="date">by <span class="author">{{ entry.author.formal_name }}</span>

View file

@ -1 +1 @@
{{ obj.headline|striptags }}
{{ obj.headline|striptags|safe }}

View file

@ -1,3 +1,3 @@
{% if obj.subhead %}<p><strong>{{ obj.subhead }}</strong></p>{% endif %}
{% if obj.subhead %}<p><strong>{{ obj.subhead|safe }}</strong></p>{% endif %}
{{ obj.summary|safe }}
{{ obj.body|safe }}

View file

@ -1 +1 @@
{{ obj.headline|striptags }}
{{ obj.headline|striptags|safe }}

View file

@ -6,7 +6,7 @@
{% include "opengraph_urllist_partial.html" with property='video' urls=object.get_one_video_url %}
{% endblock %}
{% block subtitle %}{{ object.headline|striptags }} - {% endblock %}
{% block subtitle %}{{ object.headline|striptags|safe }} - {% endblock %}
{% block content %}

View file

@ -19,13 +19,13 @@ This partial accepts these optional parameters:
<{{ htag|default:"h3" }} class="clear"
>{% if show|default:"body" != "body" %}<a href="{{ pressr.get_absolute_url }}"
>{% endif %}{{ pressr.headline }}{% if show|default:"body" != "body" %}</a>{% endif %}</{{ htag|default:"h3" }}>
>{% endif %}{{ pressr.headline|safe }}{% if show|default:"body" != "body" %}</a>{% endif %}</{{ htag|default:"h3" }}>
{% if show != "headline" %}
{% if show != "dateline" and pressr.subhead %}
{# This filter sequence generates the "next" hN tag from htag #}
<h{{ htag|default:"3"|last|get_digit:1|add:1 }}
>{{ pressr.subhead }}</h{{ htag|default:"3"|last|get_digit:1|add:1 }}>
>{{ pressr.subhead|safe }}</h{{ htag|default:"3"|last|get_digit:1|add:1 }}>
{% endif %}
<p class="date">{{ pressr.pub_date|date:"F j, Y" }}</p>

View file

@ -36,9 +36,9 @@ normally shouldn't need to:
{% endif %}
{% if title %}
<meta property="og:title" content="{{ title|striptags }}">
<meta property="og:title" content="{{ title|striptags|safe }}">
{% endif %}
{% if description %}
<meta property="og:description" content="{{ description|striptags }}">
<meta property="og:description" content="{{ description|striptags|safe }}">
{% endif %}