Browse Source

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

Jeremy Stretch 2 weeks ago
parent
commit
16c70c3657
1 changed files with 1 additions and 1 deletions
  1. 1 1
      netbox/utilities/error_handlers.py

+ 1 - 1
netbox/utilities/error_handlers.py

@@ -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')
     )