fix mastodon post encoding
This commit is contained in:
parent
3086d63cc7
commit
27a4b1a094
3 changed files with 92 additions and 8 deletions
|
|
@ -7,9 +7,8 @@ from .models import GovernmentPlanUpdate, GovernmentPlan
|
|||
import re
|
||||
|
||||
def strip_html_tags(text):
|
||||
text = text.decode('utf-8')
|
||||
tag_re = re.compile(r'<[^>]+>')
|
||||
return tag_re.sub('', text)
|
||||
return tag_re.sub('', text).decode('utf-8')
|
||||
|
||||
def post_to_mastodon(text):
|
||||
mastodon = Mastodon(
|
||||
|
|
|
|||
|
|
@ -11,18 +11,18 @@
|
|||
{% block title %}
|
||||
{{ object.title }} - VerwaltungsTracker
|
||||
{% endblock title %}
|
||||
{% block ogTitle %}
|
||||
{{ object.title }} - VerwaltungsTracker
|
||||
{% endblock ogTitle %}
|
||||
{% block meta %}
|
||||
{% include "snippets/meta.html" %}
|
||||
{% endblock meta %}
|
||||
{% block metaDescription %}
|
||||
{{ object.quote | addquotes }}
|
||||
{% endblock %}
|
||||
{% block ogTitle %}
|
||||
{{ object.title }} - VerwaltungsTracker
|
||||
{% endblock ogTitle %}
|
||||
{% block ogDescription %}
|
||||
{{ object.quote | addquotes }}
|
||||
{% endblock %}
|
||||
{% block meta %}
|
||||
{% include "snippets/meta.html" %}
|
||||
{% endblock meta %}
|
||||
{% block app_body %}
|
||||
|
||||
<h1 class="text-body-emphasis">{{ object.title }}</h1>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue