1

I am trying to create a blog with Django, but I have a problem with the form used to create an article.
When I enter an HTML tag in this form, the output is modified. This is an example :

It looks like this
<a href="http://www.foo/bar.com">This is a link</a>

But when I look at the code it is like this

&lt;a href="http://www.foo/bar.com"&gt;This is a link&lt;/a&gt;

So do you know how could I make my form return real HTML tags ?
Thanks

1 Answer 1

1

Use safe to allow HTML tags.

{{ content|safe }}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.