I heard about the filter |safe
, but if I understood correctly, that's unsafe and creates a backdoor for injections.
What are the alternatives to display full posts with formatted text?
I heard about the filter |safe
, but if I understood correctly, that's unsafe and creates a backdoor for injections.
What are the alternatives to display full posts with formatted text?
I think when you not use the filter of
|safe
, then output should return as text only with html markup (not rendered as html output).But, if you need to exclude some dangerous tags such as
<script>location.reload()</script>
, you need to handle it with custom templatetag filter..I got good answer from: https://stackoverflow.com/a/699483/6396981, via
BeautifulSoup
.Hope it usefull..