From fdfebf783e561b97536292c01d51f4aab9d0249b Mon Sep 17 00:00:00 2001 From: app Date: Tue, 16 May 2023 11:49:02 +0000 Subject: [PATCH] Converting richtext stream to str --- publichealth/home/custom_filters.py | 2 +- publichealth/home/templates/home/page_content.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/publichealth/home/custom_filters.py b/publichealth/home/custom_filters.py index d7be0da..970546e 100644 --- a/publichealth/home/custom_filters.py +++ b/publichealth/home/custom_filters.py @@ -5,4 +5,4 @@ register = template.Library() @register.filter def ph_html_decode(value): - return unescape(value) + return unescape(str(value)) diff --git a/publichealth/home/templates/home/page_content.html b/publichealth/home/templates/home/page_content.html index 45814a2..589c7c4 100644 --- a/publichealth/home/templates/home/page_content.html +++ b/publichealth/home/templates/home/page_content.html @@ -25,7 +25,7 @@ {% endif %} {% elif block.block_type == 'iframe' %} {% autoescape off %} - {{ block.value|ph_html_decode }} + {{ block.value|richtext|ph_html_decode}} {% endautoescape %} {% elif block.block_type != 'info' %}