I have a problem with breaking words in the right place at the Django template. Appears ­
I'm trying to filter safe, but it does not work.
Here is my code:
<div class="my_class">
<h3>{{ object.title|safe }}</h3>
</div>
From the doc here: safe
safe
Marks a string as not requiring further HTML escaping prior to output. When autoescaping is off, this filter has no effect.
And Django's templating engine does escaping automatically, look When should I use escape and safe in Django's template system?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.