For a project, I want to use feedparser. Basicly I got it working.
In the documentation section about sanitization is described, that not all content types are sanitized. How can I force feedparser to do this on all content types?
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 think the feedparser doc page you referenced gives good advice:
*It is recommended that you check the content type in e.g. entries[i].summary_detail.type. If it is text/plain then it has not been sanitized (and you should perform HTML escaping before rendering the content).*
Of course, there are dozens of ways you can iterate through the entries depending on what you want to do with them once they are clean.