I'm trying to print out HTML generated for user-submitter markdown
, by
{{=markdown(post.message)}}
where markdown function is imported through
from gluon.contrib.markdown.markdown2 import markdown
We2Py seems to automatically encode HTML-Entities, so every <
is converted into <
and every >
is converted into >
. How do I prevent this from happening?
Are there any security concerns that I'll need to keep in mind while doing so? Also, could anyone kindly tell me how can I strip the HTML
when storing it in the database, while retaining the markdown
?