[Flask] render_template_string doesn't render
Patrick L Jones
plj at mitre.org
Fri Aug 13 14:48:55 EDT 2021
I have the following:
return render_template_string('<h1>PLEASE CLOSE THIS WINDOW</h1>')
When the following is called what is displayed in the browser is :
'<h1>PLEASE CLOSE THIS WINDOW</h1>'
It doesn't get rendered. I have tried various option as seen on the web, such as:
return render_template_string('''<!doctype html>
<link rel="stylesheet" href="css url"/>
It just displays the html, it doesn't render it. I have also tried render_template('pleaseclose.html'), it also just displays the html in the file and doesn't render it
The way the get(self) is called is by a callback from an OAuth2 request.
Any thoughts ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Flask