tests: use or remove |safe now that autoescape is off (#21343)
This commit is contained in:
parent
19227e7a6d
commit
c8a06c48f3
|
@ -715,6 +715,11 @@ def test_register_comment(pub):
|
|||
formdata.evolution[-1]._display_parts = None
|
||||
assert formdata.evolution[-1].display_parts()[-1] == '<div>1 < 3</div>'
|
||||
|
||||
item.comment = '{{ foo|safe }}'
|
||||
item.perform(formdata)
|
||||
formdata.evolution[-1]._display_parts = None
|
||||
assert formdata.evolution[-1].display_parts()[-1] == '<div>1 < 3</div>'
|
||||
|
||||
item.comment = '[foo]'
|
||||
item.perform(formdata)
|
||||
formdata.evolution[-1]._display_parts = None
|
||||
|
@ -857,8 +862,8 @@ def test_email(pub, emails):
|
|||
|
||||
# template for subject or body (Django)
|
||||
emails.empty()
|
||||
item.subject = '{{ bar|safe }}'
|
||||
item.body = '{{ foo|safe }}'
|
||||
item.subject = '{{ bar }}'
|
||||
item.body = '{{ foo }}'
|
||||
item.perform(formdata)
|
||||
get_response().process_after_jobs()
|
||||
assert emails.count() == 1
|
||||
|
|
Loading…
Reference in New Issue