mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-04 05:24:45 +00:00
str() no longer makes SafeText unsafe, so explicitly modify it
This commit is contained in:
parent
9bf8735e0e
commit
fd4666b257
1 changed files with 2 additions and 2 deletions
|
|
@ -512,11 +512,11 @@ class RawHTMLBlock(FieldBlock):
|
|||
def get_prep_value(self, value):
|
||||
# explicitly convert to a plain string, just in case we're using some serialisation method
|
||||
# that doesn't cope with SafeText values correctly
|
||||
return str(value)
|
||||
return str(value) + ''
|
||||
|
||||
def value_for_form(self, value):
|
||||
# need to explicitly mark as unsafe, or it'll output unescaped HTML in the textarea
|
||||
return str(value)
|
||||
return str(value) + ''
|
||||
|
||||
def value_from_form(self, value):
|
||||
return mark_safe(value)
|
||||
|
|
|
|||
Loading…
Reference in a new issue