ex: i want to clean the “script” tag , but i want to keep the ‘a’ tag ,
so what lib you using to do this .
and i use jquery cleditor for WYSIWYG HTML editor , can it do this for me automatically ?
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I suppose that BeautifulSoup should do the trick, here.
Actually, here’s a question + answers that’s exactly about that : Python HTML sanitizer / scrubber / filter