{ "info": { "author": "reddit", "author_email": "reddit@reddit.com", "bugtrack_url": null, "classifiers": [], "description": "reddit-cssfilter\n================\n\n|Build Status|\n\ncssfilter.py extracted from reddit's source code.\n\nThis library allows you to filter \"unsafe\" css from your users.\n\n**This library requires attribution!:**\n\nWhen using this library, reddit requires you to put the following information in the splash or the \"about\" section of your application.\n\n EXHIBIT B. Attribution Information\n\n Attribution Copyright Notice: Copyright (c) 2006-2015 reddit Inc. All Rights\n Reserved.\n\n Attribution Phrase (not exceeding 10 words): Powered by reddit\n\n Attribution URL: http://code.reddit.com\n\n Graphic Image as provided in the Covered Code:\n http://code.reddit.com/reddit_logo.png\n\nInfo\n~~~~\n\nParse and validate a safe subset of CSS.\n\nThe goal of this validation is not to ensure functionally correct stylesheets\nbut rather that the stylesheet is safe to show to downstream users. This\nincludes:\n\n* not generating requests to third party hosts (information leak)\n* xss via strange syntax in buggy browsers\n\nBeyond that, every effort is made to allow the full gamut of modern CSS.\n\n\nHow to use\n~~~~~~~~~~\n\n.. code-block:: python\n\n import reddit_cssfilter.cssfilter\n cssfilter.validate_css(stylesheet, images)\n\n..\n\n Validate and re-serialize the user submitted stylesheet.\n \n images is a mapping of subreddit image names to their URLs. The\n re-serialized stylesheet will have %%name%% tokens replaced with their\n appropriate URLs.\n \n The return value is a two-tuple of the re-serialized (and minified)\n stylesheet and a list of errors. If the list is empty, the stylesheet is\n valid.\n\n\nLicence\n~~~~~~~\n\nCopyright (c) 2006-2015 reddit Inc. All Rights Reserved.\n\nCommon Public Attribution License Version 1.0 (CPAL)\n\nThe full license is available here: `reddit Inc. Common Public Attribution License Version 1.0 (CPAL) `_.\n\n.. |Build Status| image:: https://travis-ci.org/andychase/reddit-cssfilter.svg?branch=master\n :target: https://travis-ci.org/andychase/reddit-cssfilter", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/andychase/reddit-cssfilter/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/andychase/reddit-cssfilter", "keywords": null, "license": "Common Public Attribution License Version 1.0 (CPAL)", "maintainer": null, "maintainer_email": null, "name": "reddit-cssfilter", "package_url": "https://pypi.org/project/reddit-cssfilter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/reddit-cssfilter/", "project_urls": { "Download": "https://github.com/andychase/reddit-cssfilter/archive/master.zip", "Homepage": "https://github.com/andychase/reddit-cssfilter" }, "release_url": "https://pypi.org/project/reddit-cssfilter/1.2/", "requires_dist": null, "requires_python": null, "summary": "Parse and validate a safe subset of CSS", "version": "1.2" }, "last_serial": 1807365, "releases": { "1.0": [], "1.1": [ { "comment_text": "", "digests": { "md5": "dc58f4d6058762435ecf53d921989a9c", "sha256": "212402dfc15911677d226c60da04a3a20fdcb159b705fa4f20b72db13a82c410" }, "downloads": -1, "filename": "reddit-cssfilter-1.1.tar.gz", "has_sig": false, "md5_digest": "dc58f4d6058762435ecf53d921989a9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7278, "upload_time": "2015-11-09T03:02:35", "url": "https://files.pythonhosted.org/packages/c8/0d/e838e0a5ea1bb94200972fabc308243b22e4e693bc2d8e2c1e61a6498a46/reddit-cssfilter-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "a6d2838d5d286677070b45e94ea4dd64", "sha256": "d058ad2597d10dc482eda2445ab5c70a6b0cd9c3a96df487035ba5db23f860ec" }, "downloads": -1, "filename": "reddit-cssfilter-1.2.tar.gz", "has_sig": false, "md5_digest": "a6d2838d5d286677070b45e94ea4dd64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7679, "upload_time": "2015-11-09T06:00:16", "url": "https://files.pythonhosted.org/packages/40/eb/c651584fb3d335f14c757bdaed7830202b58ff3af385c2785ea9cc236f56/reddit-cssfilter-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a6d2838d5d286677070b45e94ea4dd64", "sha256": "d058ad2597d10dc482eda2445ab5c70a6b0cd9c3a96df487035ba5db23f860ec" }, "downloads": -1, "filename": "reddit-cssfilter-1.2.tar.gz", "has_sig": false, "md5_digest": "a6d2838d5d286677070b45e94ea4dd64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7679, "upload_time": "2015-11-09T06:00:16", "url": "https://files.pythonhosted.org/packages/40/eb/c651584fb3d335f14c757bdaed7830202b58ff3af385c2785ea9cc236f56/reddit-cssfilter-1.2.tar.gz" } ] }