{ "info": { "author": "Samuel Adam", "author_email": "samuel.adam@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Topic :: Text Processing :: Filters", "Topic :: Text Processing :: Markup :: HTML" ], "description": "About\n-----\n\nVery simple white list HTML filter.\n\nUse it with a WYSIWYG editor on the client side.\n\n\nUsage\n-----\n\n::\n\tfrom htmlfilter import HTMLFilter\n\thf = HTMLFilter()\n\tcleaned_html = hf.filter(dirty_html)\n\n\nRules file\n----------\n\nThe filter is instanciated with a predefined set of rules.\nhttp://github.com/samueladam/htmlfilter/blob/master/htmlfilter/rules.py\n\nYou can create your own rules file::\n\n\t# file: my_rules.py\n\tTAGS = {\n\t\t'a': ('href', 'name',),\n\t\t'p': ('class',),\n\t}\n\n\t# define filters on attributes data (tag_attr)\n\tdef p_class(data):\n\t if data not in ('class1', 'class2',):\n\t data = ''\n\t return data\n\t\n\nAnd use them this way::\n\n\tfrom htmlfilter import HTMLFilter\n\timport my_rules\n\n\thf = HTMLFilter(rules=my_rules)\n\tcleaned_html = hf.filter(dirty_html)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/samueladam/htmlfilter", "keywords": "html,filter,white list,parser,clean,tags", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "htmlfilter", "package_url": "https://pypi.org/project/htmlfilter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/htmlfilter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/samueladam/htmlfilter" }, "release_url": "https://pypi.org/project/htmlfilter/0.2/", "requires_dist": null, "requires_python": null, "summary": "White list HTML filter", "version": "0.2" }, "last_serial": 793054, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "1f30857c7a51ab65d5e72194f8976b6d", "sha256": "7db96cd0a7177a8c6c9e1b492d5ea99c97d7e40b53e8aec1577a281085f6246d" }, "downloads": -1, "filename": "htmlfilter-0.2.tar.gz", "has_sig": false, "md5_digest": "1f30857c7a51ab65d5e72194f8976b6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3109, "upload_time": "2010-05-03T13:55:26", "url": "https://files.pythonhosted.org/packages/cb/e3/6ffcdeb32db84999eb75cf0627f9ceff25e39b7dab0c7cd449f503b8220a/htmlfilter-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1f30857c7a51ab65d5e72194f8976b6d", "sha256": "7db96cd0a7177a8c6c9e1b492d5ea99c97d7e40b53e8aec1577a281085f6246d" }, "downloads": -1, "filename": "htmlfilter-0.2.tar.gz", "has_sig": false, "md5_digest": "1f30857c7a51ab65d5e72194f8976b6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3109, "upload_time": "2010-05-03T13:55:26", "url": "https://files.pythonhosted.org/packages/cb/e3/6ffcdeb32db84999eb75cf0627f9ceff25e39b7dab0c7cd449f503b8220a/htmlfilter-0.2.tar.gz" } ] }