From b5ed07f84f18282373303f7cbceb03df9e35ab07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 28 Jul 2018 14:59:12 +0200 Subject: [PATCH 3/3] workflows: remove now unused support for custom escape function (#25521) --- wcs/workflows.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/wcs/workflows.py b/wcs/workflows.py index 90074e5e..8d831719 100644 --- a/wcs/workflows.py +++ b/wcs/workflows.py @@ -2391,9 +2391,8 @@ class SendmailWorkflowStatusItem(WorkflowStatusItem): register_item_class(SendmailWorkflowStatusItem) -def get_formdata_template_context(formdata=None, process=None): - ctx = {} - ctx.update(get_publisher().substitutions.get_context_variables()) +def get_formdata_template_context(formdata=None): + ctx = get_publisher().substitutions.get_context_variables() if formdata: ctx['url'] = formdata.get_url() ctx['url_status'] = '%sstatus' % formdata.get_url() @@ -2411,10 +2410,6 @@ def get_formdata_template_context(formdata=None, process=None): ctx['after'] = ctx.get('form_status') ctx['evolution'] = ctx.get('form_evolution') - if process: - for key in ctx: - ctx[key] = process(ctx[key]) - charset = get_publisher().site_charset for k, v in ctx.items(): if isinstance(v, unicode): @@ -2426,13 +2421,12 @@ def template_on_html_string(template): return template_on_formdata(None, template, ezt_format=ezt.FORMAT_HTML) -def template_on_formdata(formdata=None, template=None, process=None, - **kwargs): +def template_on_formdata(formdata=None, template=None, **kwargs): assert template is not None if not Template.is_template_string(template): # no tags, no variables: don't even process formdata return template - context = get_formdata_template_context(formdata, process=process) + context = get_formdata_template_context(formdata) return template_on_context(context, template, **kwargs) -- 2.18.0