mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
fix one more place where senders weren't sanitised
make sure everything is using the `nl2br` formatter that properly wraps it in markdown to keep everything sanitised nicely. Also write a couple of tests
This commit is contained in:
@@ -31,6 +31,7 @@ from xlrd.xldate import XLDateError
|
||||
from app import (
|
||||
current_service,
|
||||
job_api_client,
|
||||
nl2br,
|
||||
notification_api_client,
|
||||
service_api_client,
|
||||
)
|
||||
@@ -272,7 +273,7 @@ def get_sender_context(sender_details, template_type):
|
||||
if context['default_id'] == context.get('receives_text_message', None):
|
||||
context['default_and_receives'] = context['default_id']
|
||||
|
||||
context['value_and_label'] = [(sender['id'], sender[sender_format]) for sender in sender_details]
|
||||
context['value_and_label'] = [(sender['id'], nl2br(sender[sender_format])) for sender in sender_details]
|
||||
return context
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user