render profile note with html bleached

This commit is contained in:
Your Name 2023-01-26 17:31:20 -05:00 committed by Henri Dickson
parent b9bd4355f7
commit 945d3c2058
3 changed files with 7 additions and 1 deletions

View file

@ -50,6 +50,7 @@ INSTALLED_APPS = [
"django.contrib.postgres",
"django_sass",
"django_rq",
"django_bleach",
"tz_detect",
"simple_history",
"markdownx",
@ -305,6 +306,9 @@ GOOGLE_API_KEY = "***REMOVED***"
IGDB_CLIENT_ID = "deadbeef"
IGDB_CLIENT_SECRET = "deadbeef"
BLEACH_STRIP_COMMENTS = True
BLEACH_STRIP_TAGS = True
# Thumbnail setting
# It is possible to optimize the image size even more: https://easy-thumbnails.readthedocs.io/en/latest/ref/optimize/
THUMBNAIL_ALIASES = {

View file

@ -6,6 +6,7 @@
{% load truncate %}
{% load thumb %}
{% load collection %}
{% load bleach_tags %}
<div class="grid__aside grid__aside--reverse-order grid__aside--tablet-column">
<div class="aside-section-wrapper aside-section-wrapper--no-margin">
@ -26,7 +27,7 @@
</a>
{% endif %}
</p>
<p class="user-profile__bio mast-brief">{{ user.mastodon_account.note }}</p>
<p class="user-profile__bio mast-brief">{{ user.mastodon_account.note|bleach:"a,p,span,br" }}</p>
{% if request.user != user %}
<a href="{% url 'users:report' %}?user_id={{ user.id }}"

View file

@ -12,6 +12,7 @@ django-ninja
django-polymorphic
django-maintenance-mode
django-tz-detect
django-bleach
meilisearch
easy-thumbnails
lxml