From bc41ab51a8b7d3de6e191af746d45e7db79ccbe591db624db5da67b6fa73b286 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 2 Jun 2014 09:05:03 +0000 Subject: [PATCH] Accepting request 235461 from home:frispete:python that's a useful library OBS-URL: https://build.opensuse.org/request/show/235461 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bleach?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + bleach-1.4.tar.gz | 3 ++ python-bleach.changes | 5 +++ python-bleach.spec | 79 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 111 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 bleach-1.4.tar.gz create mode 100644 python-bleach.changes create mode 100644 python-bleach.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/bleach-1.4.tar.gz b/bleach-1.4.tar.gz new file mode 100644 index 0000000..3018e49 --- /dev/null +++ b/bleach-1.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab6947515ac2cc2fb894e718cbab1beeb342843fd816d4c2a277599ddbefba7b +size 17454 diff --git a/python-bleach.changes b/python-bleach.changes new file mode 100644 index 0000000..fa3a029 --- /dev/null +++ b/python-bleach.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon May 26 22:28:56 UTC 2014 - hpj@urpla.net + +- version 1.4: initial build + diff --git a/python-bleach.spec b/python-bleach.spec new file mode 100644 index 0000000..61a97e2 --- /dev/null +++ b/python-bleach.spec @@ -0,0 +1,79 @@ +# +# spec file for package python-bleach +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 LISA GmbH, Bingen, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + + +Name: python-bleach +Version: 1.4 +Release: 0 +License: Apache-2.0 +Summary: An easy whitelist-based HTML-sanitizing tool +Url: http://github.com/jsocol/bleach +Group: Development/Languages/Python +Source: https://pypi.python.org/packages/source/b/bleach/bleach-%{version}.tar.gz +BuildRequires: python-devel +BuildRequires: python-nose +BuildRequires: python-setuptools +BuildRequires: python-six +Requires: python-six +BuildRequires: python-html5lib >= 0.999 +Requires: python-html5lib >= 0.999 +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%else +BuildArch: noarch +%endif + +%description +Bleach is an HTML sanitizing library that escapes or strips markup and +attributes based on a white list. Bleach can also linkify text safely, applying +filters that Django's ``urlize`` filter cannot, and optionally setting ``rel`` +attributes, even on links already in the text. + +Bleach is intended for sanitizing text from *untrusted* sources. If you find +yourself jumping through hoops to allow your site administrators to do lots of +things, you're probably outside the use cases. Either trust those users, or +don't. + +Because it relies on html5lib, Bleach is as good as modern browsers at dealing +with weird, quirky HTML fragments. And *any* of Bleach's methods will fix +unbalanced or mis-nested tags. + +The version on GitHub_ is the most up-to-date and contains the latest bug +fixes. You can find full documentation on `ReadTheDocs`. + +http://bleach.readthedocs.org/ + +%prep +%setup -q -n bleach-%{version} + +%build +python setup.py build + +%install +python setup.py install --prefix=%{_prefix} --root=%{buildroot} + +%check +nosetests + +%files +%defattr(-,root,root,-) +%doc LICENSE README.rst +%{python_sitelib}/* + +%changelog