Is there a way to remove/escape html tags using lxml.html and not beautifulsoup which has some xss issues? I tried using cleaner, but i want to remove all html.
Is there a way to remove/escape html tags using lxml.html and not beautifulsoup which
Share
Try the
.text_content()method on an element, probably best after usinglxml.html.cleanto get rid of unwanted content (script tags etc…). For example: