'django markdownx isn't allowing normal html tags
I added django-markdownx to my project. Everything is working fine with this custom filter:
import markdown
@register.filter
def markdownify(text):
return markdown.markdown(text, safe_mode='escape')
This is converting markdown to HTML but if the file contains normal HTML it will convert the markdown successfully but not the normal HTML.
This is how I use the filter:
{{ Post.body|markdownify|safe|linebreaks }}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
