From f816bc6d3bf832976cad65313706a2704d62eed0 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:56:19 +0200 Subject: [PATCH 2/3] workflows: use ezt escaping code for history notes (#25521) --- wcs/wf/register_comment.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/wcs/wf/register_comment.py b/wcs/wf/register_comment.py index 6ef37745..679f8b1c 100644 --- a/wcs/wf/register_comment.py +++ b/wcs/wf/register_comment.py @@ -16,7 +16,7 @@ import cgi -from qommon import _ +from qommon import _, ezt from qommon.form import * from qommon.template import TemplateError from qommon import get_logger @@ -41,11 +41,8 @@ class JournalEvolutionPart: #pylint: disable=C1001 if message.startswith('<'): # treat it as html, escape strings from ezt variables - def escape(x): - if isinstance(x, basestring): - return cgi.escape(x) - return x - self.content = template_on_formdata(formdata, message, process=escape) + self.content = template_on_formdata(formdata, message, + ezt_format=ezt.FORMAT_HTML) return # treat is as text/plain -- 2.18.0