I know the flask function render_template. I have to give the file name of the template. But now I want to render the string of a template (that is the content
render_template
Taken from What's the easiest way to escape HTML in Python.
import cgi rendered = render_template('template.html') return cgi.escape(rendered)