javascript - Best way to sanitize untrusted CSS with Python -


i want allow users upload own css customize look, css can used run javascript. best way sanitize python?

i found answers on other langugages: sanitizing css in rails, sanitize css using java, sanitize user defined css in php found nothing on python.

i did find https://pythonhosted.org/feedparser/html-sanitization.html#css-sanitization bit limiting, i.e. not allowing url @ all.

from links, looks either have whitelist or blacklist stuff. personally, if informed enough, try blacklisting unwanted components. parsing, have looked cssutils python ?


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -