L
L
Legalas612019-11-26 00:25:27
Django
Legalas61, 2019-11-26 00:25:27

How to check if it's empty in django-summernote?

I am using django-summernote for comments on the site. I process Ajax before sending to the server. If you just "send", then the form field is empty (check through .length === 0 ), you can send, but if you just click on the field, then I will automatically receive other tags from manipulations. While cleaning the string with a regula from spaces and p, br tags comes to mind. and if the character remains, then accept it on the server. But there must be a better way. Tell me please =) <p></p>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
antonksa, 2019-11-28
@antonksa

Google on request python strip html tags gives one and a half million results.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question