fix: don't escape each address for email attempts grid

now that we are properly escaping the full cell value, no need
This commit is contained in:
Lance Edgar 2024-06-30 10:32:05 -05:00
parent 9b6447c4cb
commit 83e4d95741

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2023 Lance Edgar
# Copyright © 2010-2024 Lance Edgar
#
# This file is part of Rattail.
#
@ -28,14 +28,13 @@ import logging
import re
import warnings
from rattail import mail
from rattail.db import model
from rattail.config import parse_list
from wuttjamaican.util import parse_list
from rattail.db.model import EmailAttempt
from rattail.util import simple_error
import colander
from deform import widget as dfwidget
from webhelpers2.html import HTML
from tailbone import grids
from tailbone.db import Session
@ -85,7 +84,7 @@ class EmailSettingView(MasterView):
]
def __init__(self, request):
super(EmailSettingView, self).__init__(request)
super().__init__(request)
self.email_handler = self.get_handler()
@property
@ -204,7 +203,7 @@ class EmailSettingView(MasterView):
return True
def configure_form(self, f):
super(EmailSettingView, self).configure_form(f)
super().configure_form(f)
profile = f.model_instance['_email']
# key
@ -437,7 +436,7 @@ class EmailPreview(View):
"""
def __init__(self, request):
super(EmailPreview, self).__init__(request)
super().__init__(request)
if hasattr(self, 'get_handler'):
warnings.warn("defining a get_handler() method is deprecated; "
@ -520,7 +519,7 @@ class EmailAttemptView(MasterView):
"""
Master view for email attempts.
"""
model_class = model.EmailAttempt
model_class = EmailAttempt
route_prefix = 'email_attempts'
url_prefix = '/email/attempts'
creatable = False
@ -553,7 +552,7 @@ class EmailAttemptView(MasterView):
]
def configure_grid(self, g):
super(EmailAttemptView, self).configure_grid(g)
super().configure_grid(g)
# sent
g.set_sort_defaults('sent', 'desc')
@ -583,13 +582,12 @@ class EmailAttemptView(MasterView):
if len(recips) > 2:
recips = recips[:2]
recips.append('...')
recips = [HTML.escape(r) for r in recips]
return ', '.join(recips)
return value
def configure_form(self, f):
super(EmailAttemptView, self).configure_form(f)
super().configure_form(f)
# key
f.set_renderer('key', self.render_email_key)