2

I use CKEditor in my django project to take bio details from user. When I display user data on front end, It show with html tag. How to I remove tag from front end & give display effect of that tag?

 {% for user in user_list %}
            <tr>
                <td>{{user.name}}</td>
                <td>{{user.gender}}</td>
                <td>{{user.dob}}</td>
                <td>{{user.hobbies}}</td>
                <td>{{user.message}}</td>
                <td>{{user.bio}}</td>

its shows as this:

<p><em><strong>Bio</strong></em></p>
  • Possible duplicate of [Rendering a template variable as HTML](https://stackoverflow.com/questions/4848611/rendering-a-template-variable-as-html) – Masoud Keshavarz Jul 17 '19 at 07:23

1 Answers1

3

use {{user.bio|safe}} instead of {{user.bio}}.

Shubham Devgan
  • 609
  • 6
  • 18