Filter safe does not work on the shy tag issue

233 Views Asked by At

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>
1

There are 1 best solutions below

0
On BEST ANSWER

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?