From 7501b616bdcc2183fcda2aeddd2e5c50e58017d9 Mon Sep 17 00:00:00 2001 From: Jean-Denis Girard Date: Wed, 14 Sep 2022 14:34:57 -1000 Subject: [PATCH] Allow CDATA text We needed to send embedded XML as CDATA in the request. Without this modification, the embedded XML was escaped, now it is transmitted unmodified. --- src/zeep/xsd/types/simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zeep/xsd/types/simple.py b/src/zeep/xsd/types/simple.py index a492969c7..943673d7e 100644 --- a/src/zeep/xsd/types/simple.py +++ b/src/zeep/xsd/types/simple.py @@ -93,7 +93,7 @@ def render( if value is Nil: node.set(xsi_ns("nil"), "true") return - node.text = self.xmlvalue(value) + node.text = value if isinstance(value, etree.CDATA) else self.xmlvalue(value) def signature(self, schema=None, standalone=True): return self.get_prefixed_name(schema)