mirror of
https://github.com/pretix/pretix.git
synced 2026-09-13 16:14:40 +00:00
Bleach 6 update (#4610)
* Update bleach requirement from ==5.0.* to ==6.2.* Updates the requirements on [bleach](https://github.com/mozilla/bleach) to permit the latest version. - [Changelog](https://github.com/mozilla/bleach/blob/main/CHANGES) - [Commits](https://github.com/mozilla/bleach/compare/v5.0.0...v6.2.0) --- updated-dependencies: - dependency-name: bleach dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Update bleach parameter types * Fix tests --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -421,7 +421,7 @@ class PDFCheckinList(ReportlabExportMixin, CheckInListMixin, BaseExporter):
|
||||
)
|
||||
if op.seat:
|
||||
item += '<br/>' + str(op.seat)
|
||||
name = bleach.clean(str(name), tags=['br']).strip().replace('<br>', '<br/>')
|
||||
name = bleach.clean(str(name), tags={'br'}).strip().replace('<br>', '<br/>')
|
||||
if op.blocked:
|
||||
name = '<font face="OpenSansBd">[' + _('Blocked') + ']</font> ' + name
|
||||
row = [
|
||||
@@ -430,7 +430,7 @@ class PDFCheckinList(ReportlabExportMixin, CheckInListMixin, BaseExporter):
|
||||
'✘' if op.order.status != Order.STATUS_PAID else '✔',
|
||||
op.order.code,
|
||||
Paragraph(name, self.get_style()),
|
||||
Paragraph(bleach.clean(str(item), tags=['br']).strip().replace('<br>', '<br/>'), self.get_style()),
|
||||
Paragraph(bleach.clean(str(item), tags={'br'}).strip().replace('<br>', '<br/>'), self.get_style()),
|
||||
]
|
||||
acache = {}
|
||||
if op.addon_to:
|
||||
@@ -440,7 +440,7 @@ class PDFCheckinList(ReportlabExportMixin, CheckInListMixin, BaseExporter):
|
||||
acache[a.question_id] = format_answer_for_export(a)
|
||||
for q in questions:
|
||||
txt = acache.get(q.pk, '')
|
||||
txt = bleach.clean(txt, tags=['br']).strip().replace('<br>', '<br/>')
|
||||
txt = bleach.clean(txt, tags={'br'}).strip().replace('<br>', '<br/>')
|
||||
p = Paragraph(txt, self.get_style())
|
||||
while p.wrap(colwidths[len(row)], 5000)[1] > 50 * mm:
|
||||
txt = txt[:len(txt) - 50] + "..."
|
||||
|
||||
@@ -198,7 +198,7 @@ class BaseSenderView(EventPermissionRequiredMixin, FormView):
|
||||
escape(v.render_sample(self.request.event))
|
||||
)
|
||||
|
||||
subject = bleach.clean(form.cleaned_data['subject'].localize(l), tags=[])
|
||||
subject = bleach.clean(form.cleaned_data['subject'].localize(l), tags=set())
|
||||
preview_subject = prefix_subject(self.request.event, format_map(subject, context_dict), highlight=True)
|
||||
message = form.cleaned_data['message'].localize(l)
|
||||
preview_text = markdown_compile_email(format_map(message, context_dict))
|
||||
@@ -616,7 +616,7 @@ class CreateRule(EventPermissionRequiredMixin, CreateView):
|
||||
escape(v.render_sample(self.request.event))
|
||||
)
|
||||
|
||||
subject = bleach.clean(form.cleaned_data['subject'].localize(l), tags=[])
|
||||
subject = bleach.clean(form.cleaned_data['subject'].localize(l), tags=set())
|
||||
preview_subject = prefix_subject(self.request.event, format_map(subject, context_dict), highlight=True)
|
||||
template = form.cleaned_data['template'].localize(l)
|
||||
preview_text = markdown_compile_email(format_map(template, context_dict))
|
||||
@@ -692,7 +692,7 @@ class UpdateRule(EventPermissionRequiredMixin, UpdateView):
|
||||
escape(v.render_sample(self.request.event))
|
||||
)
|
||||
|
||||
subject = bleach.clean(self.object.subject.localize(lang), tags=[])
|
||||
subject = bleach.clean(self.object.subject.localize(lang), tags=set())
|
||||
preview_subject = prefix_subject(self.request.event, format_map(subject, placeholders), highlight=True)
|
||||
template = self.object.template.localize(lang)
|
||||
preview_text = markdown_compile_email(format_map(template, placeholders))
|
||||
|
||||
Reference in New Issue
Block a user