From 008f49100f87685ce218fa8bb86dd9d152636081 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Fri, 24 Sep 2021 13:54:34 +0200 Subject: [PATCH] Fix display_mailboxes format (mark HTML as safe) --- orchestra/contrib/mailboxes/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orchestra/contrib/mailboxes/admin.py b/orchestra/contrib/mailboxes/admin.py index f1b54feb..3314b1db 100644 --- a/orchestra/contrib/mailboxes/admin.py +++ b/orchestra/contrib/mailboxes/admin.py @@ -252,7 +252,7 @@ class AddressAdmin(SelectAccountAdminMixin, ExtendedModelAdmin): def display_mailboxes(self, address): boxes = address.mailboxes.all() return format_html_join( - '
', '{}', + mark_safe('
'), '{}', [(change_url(mailbox), mailbox.name) for mailbox in boxes] ) display_mailboxes.short_description = _("Mailboxes") @@ -261,7 +261,7 @@ class AddressAdmin(SelectAccountAdminMixin, ExtendedModelAdmin): def display_all_mailboxes(self, address): boxes = address.get_mailboxes() return format_html_join( - '
', '{}', + mark_safe('
'), '{}', [(change_url(mailbox), mailbox.name) for mailbox in boxes] ) display_all_mailboxes.short_description = _("Mailboxes links")