X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fns.py;h=118b31ea00898a5aadbfc55231fcf64dd4e0e671;hb=ef91e081388b7eb99bd359c6eca0b757285f584a;hp=ae151db021ddbcfab9c73e27a02c345fa833ff42;hpb=83132fbcfd4ad4c5427141f2e62186aa0021d1b6;p=osm%2FLCM.git diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index ae151db..118b31e 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -30,6 +30,7 @@ from jinja2 import ( TemplateNotFound, StrictUndefined, UndefinedError, + select_autoescape, ) from osm_lcm import ROclient @@ -414,7 +415,10 @@ class NsLcm(LcmBase): @staticmethod def _parse_cloud_init(cloud_init_text, additional_params, vnfd_id, vdu_id): try: - env = Environment(undefined=StrictUndefined, autoescape=True) + env = Environment( + undefined=StrictUndefined, + autoescape=select_autoescape(default_for_string=True, default=True), + ) template = env.from_string(cloud_init_text) return template.render(additional_params or {}) except UndefinedError as e: