mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 16:28:24 -04:00
Sanitize HTML in templates using utils
We can no longer trust that the content of templates stored in the database is safe. Utils now has code to sanitise the content of templates. This commit: - updates utils to bring this code in - modifies some integration tests to make sure everything is working (there are more extensive unit tests in utils)
This commit is contained in:
@@ -479,7 +479,7 @@ def test_should_show_preview_letter_message(
|
||||
mock_get_service_letter_template.assert_called_with(service_id, template_id)
|
||||
assert mock_letter_preview.call_args[0][0]['message'] == (
|
||||
'<h2>Subject</h2>\n'
|
||||
'<p>Your vehicle tax is about to expire</p>'
|
||||
'<p>Template <em>content</em> with & entity</p>'
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user