V
V
Viktor Yurchenko2017-10-04 20:41:28
Django
Viktor Yurchenko, 2017-10-04 20:41:28

When outputting text using the safe template tag, the markup breaks, is there a solution?

I use the visual editor ckeditor, when you paste text from another site, unnecessary divs are copied that tear the markup, the difficulty is that it is assumed that absolutely any user can use the editor, so you need to make sure that
a) It is convenient for the user, freely copy / paste text, edit and all this without using html.
b) It was as safe as possible so that the user could not enter something wrong.
But if you do not use the safe tag, then the entire html code will be displayed, which is also not necessary. Who is facing this problem, tell me where to dig?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question