I want to allow my users to upload their own CSS to customize the look, but CSS can be used to run javascript. What is the best way to sanitize it with Python?
I found some answers on other langugages: Sanitizing CSS in Rails, Sanitize CSS Using Java, Sanitize user defined CSS in PHP but found nothing on python.
I did find https://pythonhosted.org/feedparser/html-sanitization.html#css-sanitization but this is a bit too limiting, i.e. not allowing url at all.