Fixes #22448: Ensure all objects are escaped under handle_protectederror() (#22449)

This commit is contained in:
Jeremy Stretch 2026-06-16 07:43:52 -04:00 committed by GitHub
parent 0994ce9f0c
commit 16c70c3657
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ def handle_protectederror(obj_list, request, e):
# Formulate the error message
err_message = _("Unable to delete <strong>{objects}</strong>. {count} dependent objects were found: ").format(
objects=', '.join(str(obj) for obj in obj_list),
objects=', '.join(escape(obj) for obj in obj_list),
count=len(protected_objects) if len(protected_objects) <= 50 else _('More than 50')
)