From 5b4a78f6e11a9d26c71a202350805f5ab3e1a2fa Mon Sep 17 00:00:00 2001 From: Dirk B Date: Thu, 2 Dec 2021 11:31:23 +0100 Subject: [PATCH] Replaced deprecated force_text with force_str --- mdeditor/widgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mdeditor/widgets.py b/mdeditor/widgets.py index b685320..364695e 100644 --- a/mdeditor/widgets.py +++ b/mdeditor/widgets.py @@ -3,7 +3,7 @@ from django import forms from django.template.loader import render_to_string -from django.utils.encoding import force_text +from django.utils.encoding import force_str from django.utils.html import conditional_escape from django.utils.safestring import mark_safe @@ -37,7 +37,7 @@ def render(self, name, value, renderer=None, attrs=None): final_attrs = self.build_attrs(self.attrs, attrs, name=name) return mark_safe(render_to_string('markdown.html', { 'final_attrs': flatatt(final_attrs), - 'value': conditional_escape(force_text(value)), + 'value': conditional_escape(force_str(value)), 'id': final_attrs['id'], 'config': self.config, }))