I'm trying to pass a variable to a render_template as html code, but Flask automatically changes the strings instead of returning the plaintext. For instance, if I were to try to say:
@app.route("/")
def index():
return render_template("index.html", code = "<p>Hello</p>")
Flask passes the variable "code" to the website as:
<p> Hello </p>
So it renders out to just be
Hello
instead of recognizing the HTML tags. Is there any way to fix this?