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
Post a Comment