Skip to content

Commit

Permalink
Replaced deprecated force_text with force_str
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkbo committed Dec 2, 2021
1 parent ab8a2a2 commit 5b4a78f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mdeditor/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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,
}))
Expand Down

0 comments on commit 5b4a78f

Please sign in to comment.