allow tags in title/byline
This commit is contained in:
parent
5edf8a10f1
commit
e8e13562cc
3 changed files with 8 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
|||
import logging
|
||||
|
||||
import ox
|
||||
import requests
|
||||
|
||||
from django.conf import settings
|
||||
|
@ -28,7 +29,7 @@ def send_week(monday):
|
|||
year, month, day = monday.split('-')
|
||||
body = views.week(year, month, day)
|
||||
name = 'weekly-digest-%s' % monday
|
||||
subject = views.format_subject(monday)
|
||||
subject = ox.strip_tags(views.format_subject(monday))
|
||||
return send_email(name, subject, body)
|
||||
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ body {
|
|||
{% if week_title %}
|
||||
<h2 class="week{% if week_byline %} with-byline{% endif %}">
|
||||
{% if week_byline %}
|
||||
<div>{{ week_title }}</div>
|
||||
<div class="byline">{{ week_byline }}</div>
|
||||
<div>{{ week_title|safe }}</div>
|
||||
<div class="byline">{{ week_byline|safe }}</div>
|
||||
{% else %}
|
||||
{{ week_title }}
|
||||
{% endif %}
|
||||
|
@ -41,9 +41,9 @@ body {
|
|||
<div class="year-details-{{ year.year }}">
|
||||
{% for week in year.weeks %}
|
||||
{% if week.date == this_week %}
|
||||
<b>{{ week.title }}</b><br>
|
||||
<b>{{ week.title|striptags }}</b><br>
|
||||
{% else %}
|
||||
<a href="/_{{ week.date }}/">{{ week.title }}</a><br>
|
||||
<a href="/_{{ week.date }}/">{{ week.title|striptags }}</a><br>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% if week_title %}
|
||||
<a style="color: #F0F0F0;text-decoration: underline;font-size: 18px;font-weight: bold" href="{{ week_link }}">{{ week_title }}</a>
|
||||
<a style="color: #F0F0F0;text-decoration: underline;font-size: 18px;font-weight: bold" href="{{ week_link }}">{{ week_title|safe }}</a>
|
||||
{% if week_byline %}<br>
|
||||
{{ week_byline }}
|
||||
{{ week_byline|safe }}
|
||||
{% endif %}
|
||||
<br>
|
||||
<br>
|
||||
|
|
Loading…
Add table
Reference in a new issue