Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

Replaced deprecated smart_text. #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tinymce/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from django.core.serializers.json import DjangoJSONEncoder
from django.forms import Textarea, Media
from django.forms.utils import flatatt
from django.utils.encoding import smart_text
from django.utils.encoding import force_str
from django.utils.safestring import mark_safe
from django.utils.html import escape
from django.utils.translation import get_language, get_language_bidi
Expand Down Expand Up @@ -172,7 +172,7 @@ def build_attrs(self, base_attrs, extra_attrs=None, **kwargs):
def render(self, name, value, attrs=None, renderer=None):
if value is None:
value = ''
value = smart_text(value)
value = force_str(value)
final_attrs = self.build_attrs(self.attrs, attrs)
final_attrs['name'] = name
final_attrs['class'] = (final_attrs.get('class', '') + ' tinymce4-editor').lstrip()
Expand Down