Skip to content

Commit

Permalink
Fix autoescape fo Jinja template (#5419)
Browse files Browse the repository at this point in the history
  • Loading branch information
ford-at-aws authored Sep 27, 2023
1 parent c229848 commit 6a596f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Empty file added .doc_gen/images/__init__.py
Empty file.
15 changes: 8 additions & 7 deletions .doc_gen/images/render-blurbs.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import os

import jinja2
import yaml
import os

env = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(__file__))
loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),
autoescape=jinja2.select_autoescape(
enabled_extensions=("html", "xml"), default_for_string=True
),
)

with open('../metadata/sdks.yaml', 'r') as file:
with open("../metadata/sdks.yaml", "r") as file:
metadata = yaml.safe_load(file)
for language in metadata.keys():
metadata[language]
shortname = metadata[language]['property']
shortname = metadata[language]["property"]
template = env.get_template("template.txt")
print(template.render(language=language, shortname=shortname))



0 comments on commit 6a596f1

Please sign in to comment.