I'm working on a project that takes in a markdown page and converts it into HTML before inserting it into the correct document. This is the code I'm running
Python
def markdown(request, entry):
pathOfFile = "entries/" + entry + ".md"
return render(request, "encyclopedia/entry.html", {
"html_markdown": markdown2.markdown_path(pathOfFile)
})
HTML
{% block body %}
<div>
{{ html_markdown }}
</div>
{% endblock %}
And this is what is returning on the web page
<h1>CSS</h1> <p>CSS is a language that can be used to add style to an <a href="/wiki/HTML">HTML</a> page.</p>
When I inspect the source of the page the HTML is encased in quotes. Is the problem that my html_markdown variable is being read as a string? What steps can I take to get the HTML to render properly? Thanks in advance for your help!