Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
1
venv/Lib/site-packages/bleach-3.2.1.dist-info/INSTALLER
Normal file
1
venv/Lib/site-packages/bleach-3.2.1.dist-info/INSTALLER
Normal file
|
@ -0,0 +1 @@
|
|||
pip
|
13
venv/Lib/site-packages/bleach-3.2.1.dist-info/LICENSE
Normal file
13
venv/Lib/site-packages/bleach-3.2.1.dist-info/LICENSE
Normal file
|
@ -0,0 +1,13 @@
|
|||
Copyright (c) 2014-2017, Mozilla Foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
919
venv/Lib/site-packages/bleach-3.2.1.dist-info/METADATA
Normal file
919
venv/Lib/site-packages/bleach-3.2.1.dist-info/METADATA
Normal file
|
@ -0,0 +1,919 @@
|
|||
Metadata-Version: 2.1
|
||||
Name: bleach
|
||||
Version: 3.2.1
|
||||
Summary: An easy safelist-based HTML-sanitizing tool.
|
||||
Home-page: https://github.com/mozilla/bleach
|
||||
Maintainer: Will Kahn-Greene
|
||||
Maintainer-email: willkg@mozilla.com
|
||||
License: Apache Software License
|
||||
Platform: UNKNOWN
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Environment :: Web Environment
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: Apache Software License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
|
||||
Requires-Dist: packaging
|
||||
Requires-Dist: six (>=1.9.0)
|
||||
Requires-Dist: webencodings
|
||||
|
||||
======
|
||||
Bleach
|
||||
======
|
||||
|
||||
.. image:: https://travis-ci.org/mozilla/bleach.svg?branch=master
|
||||
:target: https://travis-ci.org/mozilla/bleach
|
||||
|
||||
.. image:: https://badge.fury.io/py/bleach.svg
|
||||
:target: http://badge.fury.io/py/bleach
|
||||
|
||||
Bleach is an allowed-list-based HTML sanitizing library that escapes or strips
|
||||
markup and attributes.
|
||||
|
||||
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`_.
|
||||
|
||||
:Code: https://github.com/mozilla/bleach
|
||||
:Documentation: https://bleach.readthedocs.io/
|
||||
:Issue tracker: https://github.com/mozilla/bleach/issues
|
||||
:License: Apache License v2; see LICENSE file
|
||||
|
||||
|
||||
Reporting Bugs
|
||||
==============
|
||||
|
||||
For regular bugs, please report them `in our issue tracker
|
||||
<https://github.com/mozilla/bleach/issues>`_.
|
||||
|
||||
If you believe that you've found a security vulnerability, please `file a secure
|
||||
bug report in our bug tracker
|
||||
<https://bugzilla.mozilla.org/enter_bug.cgi?assigned_to=nobody%40mozilla.org&product=Webtools&component=Bleach-security&groups=webtools-security>`_
|
||||
or send an email to *security AT mozilla DOT org*.
|
||||
|
||||
For more information on security-related bug disclosure and the PGP key to use
|
||||
for sending encrypted mail or to verify responses received from that address,
|
||||
please read our wiki page at
|
||||
`<https://www.mozilla.org/en-US/security/#For_Developers>`_.
|
||||
|
||||
|
||||
Security
|
||||
========
|
||||
|
||||
Bleach is a security-focused library.
|
||||
|
||||
We have a responsible security vulnerability reporting process. Please use
|
||||
that if you're reporting a security issue.
|
||||
|
||||
Security issues are fixed in private. After we land such a fix, we'll do a
|
||||
release.
|
||||
|
||||
For every release, we mark security issues we've fixed in the ``CHANGES`` in
|
||||
the **Security issues** section. We include any relevant CVE links.
|
||||
|
||||
|
||||
Installing Bleach
|
||||
=================
|
||||
|
||||
Bleach is available on PyPI_, so you can install it with ``pip``::
|
||||
|
||||
$ pip install bleach
|
||||
|
||||
|
||||
Upgrading Bleach
|
||||
================
|
||||
|
||||
.. warning::
|
||||
|
||||
Before doing any upgrades, read through `Bleach Changes
|
||||
<https://bleach.readthedocs.io/en/latest/changes.html>`_ for backwards
|
||||
incompatible changes, newer versions, etc.
|
||||
|
||||
|
||||
Basic use
|
||||
=========
|
||||
|
||||
The simplest way to use Bleach is:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> import bleach
|
||||
|
||||
>>> bleach.clean('an <script>evil()</script> example')
|
||||
u'an <script>evil()</script> example'
|
||||
|
||||
>>> bleach.linkify('an http://example.com url')
|
||||
u'an <a href="http://example.com" rel="nofollow">http://example.com</a> url'
|
||||
|
||||
|
||||
Code of Conduct
|
||||
===============
|
||||
|
||||
This project and repository is governed by Mozilla's code of conduct and
|
||||
etiquette guidelines. For more details please see the `CODE_OF_CONDUCT.md
|
||||
</CODE_OF_CONDUCT.md>`_
|
||||
|
||||
|
||||
.. _html5lib: https://github.com/html5lib/html5lib-python
|
||||
.. _GitHub: https://github.com/mozilla/bleach
|
||||
.. _ReadTheDocs: https://bleach.readthedocs.io/
|
||||
.. _PyPI: https://pypi.org/project/bleach/
|
||||
|
||||
|
||||
Bleach changes
|
||||
==============
|
||||
|
||||
Version 3.2.1 (September 18th, 2020)
|
||||
------------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* change linkifier to add rel="nofollow" as documented. Thank you @mitar.
|
||||
* suppress html5lib sanitizer DeprecationWarnings #557
|
||||
|
||||
Version 3.2.0 (September 16th, 2020)
|
||||
------------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* ``html5lib`` dependency to version 1.1.0. Thank you Sam Sneddon.
|
||||
* update tests_website terminology. Thank you Thomas Grainger.
|
||||
|
||||
Version 3.1.5 (April 29th, 2020)
|
||||
--------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* replace missing ``setuptools`` dependency with ``packaging``. Thank you Benjamin Peterson.
|
||||
|
||||
Version 3.1.4 (March 24th, 2020)
|
||||
--------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
* ``bleach.clean`` behavior parsing style attributes could result in a
|
||||
regular expression denial of service (ReDoS).
|
||||
|
||||
Calls to ``bleach.clean`` with an allowed tag with an allowed
|
||||
``style`` attribute were vulnerable to ReDoS. For example,
|
||||
``bleach.clean(..., attributes={'a': ['style']})``.
|
||||
|
||||
This issue was confirmed in Bleach versions v3.1.3, v3.1.2, v3.1.1,
|
||||
v3.1.0, v3.0.0, v2.1.4, and v2.1.3. Earlier versions used a similar
|
||||
regular expression and should be considered vulnerable too.
|
||||
|
||||
Anyone using Bleach <=v3.1.3 is encouraged to upgrade.
|
||||
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1623633
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
* Style attributes with dashes, or single or double quoted values are
|
||||
cleaned instead of passed through.
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
None
|
||||
|
||||
Version 3.1.3 (March 17th, 2020)
|
||||
--------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
* Add relative link to code of conduct. (#442)
|
||||
|
||||
* Drop deprecated 'setup.py test' support. (#507)
|
||||
|
||||
* Fix typo: curren -> current in tests/test_clean.py (#504)
|
||||
|
||||
* Test on PyPy 7
|
||||
|
||||
* Drop test support for end of life Python 3.4
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
None
|
||||
|
||||
Version 3.1.2 (March 11th, 2020)
|
||||
--------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
* ``bleach.clean`` behavior parsing embedded MathML and SVG content
|
||||
with RCDATA tags did not match browser behavior and could result in
|
||||
a mutation XSS.
|
||||
|
||||
Calls to ``bleach.clean`` with ``strip=False`` and ``math`` or
|
||||
``svg`` tags and one or more of the RCDATA tags ``script``,
|
||||
``noscript``, ``style``, ``noframes``, ``iframe``, ``noembed``, or
|
||||
``xmp`` in the allowed tags whitelist were vulnerable to a mutation
|
||||
XSS.
|
||||
|
||||
This security issue was confirmed in Bleach version v3.1.1. Earlier
|
||||
versions are likely affected too.
|
||||
|
||||
Anyone using Bleach <=v3.1.1 is encouraged to upgrade.
|
||||
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1621692
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
None
|
||||
|
||||
Version 3.1.1 (February 13th, 2020)
|
||||
-----------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
* ``bleach.clean`` behavior parsing ``noscript`` tags did not match
|
||||
browser behavior.
|
||||
|
||||
Calls to ``bleach.clean`` allowing ``noscript`` and one or more of
|
||||
the raw text tags (``title``, ``textarea``, ``script``, ``style``,
|
||||
``noembed``, ``noframes``, ``iframe``, and ``xmp``) were vulnerable
|
||||
to a mutation XSS.
|
||||
|
||||
This security issue was confirmed in Bleach versions v2.1.4, v3.0.2,
|
||||
and v3.1.0. Earlier versions are probably affected too.
|
||||
|
||||
Anyone using Bleach <=v3.1.0 is highly encouraged to upgrade.
|
||||
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1615315
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
None
|
||||
|
||||
Bleach changes
|
||||
==============
|
||||
|
||||
Version 3.1.0 (January 9th, 2019)
|
||||
---------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
* Add ``recognized_tags`` argument to the linkify ``Linker`` class. This
|
||||
fixes issues when linkifying on its own and having some tags get escaped.
|
||||
It defaults to a list of HTML5 tags. Thank you, Chad Birch! (#409)
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* Add ``six>=1.9`` to requirements. Thank you, Dave Shawley (#416)
|
||||
|
||||
* Fix cases where attribute names could have invalid characters in them.
|
||||
(#419)
|
||||
|
||||
* Fix problems with ``LinkifyFilter`` not being able to match links
|
||||
across ``&``. (#422)
|
||||
|
||||
* Fix ``InputStreamWithMemory`` when the ``BleachHTMLParser`` is
|
||||
parsing ``meta`` tags. (#431)
|
||||
|
||||
* Fix doctests. (#357)
|
||||
|
||||
|
||||
Version 3.0.2 (October 11th, 2018)
|
||||
----------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* Merge ``Characters`` tokens after sanitizing them. This fixes issues in the
|
||||
``LinkifyFilter`` where it was only linkifying parts of urls. (#374)
|
||||
|
||||
|
||||
Version 3.0.1 (October 9th, 2018)
|
||||
---------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
* Support Python 3.7. It supported Python 3.7 just fine, but we added 3.7 to
|
||||
the list of Python environments we test so this is now officially supported.
|
||||
(#377)
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* Fix ``list`` object has no attribute ``lower`` in ``clean``. (#398)
|
||||
* Fix ``abbr`` getting escaped in ``linkify``. (#400)
|
||||
|
||||
|
||||
Version 3.0.0 (October 3rd, 2018)
|
||||
---------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
* A bunch of functions were moved from one module to another.
|
||||
|
||||
These were moved from ``bleach.sanitizer`` to ``bleach.html5lib_shim``:
|
||||
|
||||
* ``convert_entity``
|
||||
* ``convert_entities``
|
||||
* ``match_entity``
|
||||
* ``next_possible_entity``
|
||||
* ``BleachHTMLSerializer``
|
||||
* ``BleachHTMLTokenizer``
|
||||
* ``BleachHTMLParser``
|
||||
|
||||
These functions and classes weren't documented and aren't part of the
|
||||
public API, but people read code and might be using them so we're
|
||||
considering it an incompatible API change.
|
||||
|
||||
If you're using them, you'll need to update your code.
|
||||
|
||||
**Features**
|
||||
|
||||
* Bleach no longer depends on html5lib. html5lib==1.0.1 is now vendored into
|
||||
Bleach. You can remove it from your requirements file if none of your other
|
||||
requirements require html5lib.
|
||||
|
||||
This means Bleach will now work fine with other libraries that depend on
|
||||
html5lib regardless of what version of html5lib they require. (#386)
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* Fixed tags getting added when using clean or linkify. This was a
|
||||
long-standing regression from the Bleach 2.0 rewrite. (#280, #392)
|
||||
|
||||
* Fixed ``<isindex>`` getting replaced with a string. Now it gets escaped or
|
||||
stripped depending on whether it's in the allowed tags or not. (#279)
|
||||
|
||||
|
||||
Version 2.1.4 (August 16th, 2018)
|
||||
---------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
* Dropped support for Python 3.3. (#328)
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* Handle ambiguous ampersands in correctly. (#359)
|
||||
|
||||
|
||||
Version 2.1.3 (March 5th, 2018)
|
||||
-------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
* Attributes that have URI values weren't properly sanitized if the
|
||||
values contained character entities. Using character entities, it
|
||||
was possible to construct a URI value with a scheme that was not
|
||||
allowed that would slide through unsanitized.
|
||||
|
||||
This security issue was introduced in Bleach 2.1. Anyone using
|
||||
Bleach 2.1 is highly encouraged to upgrade.
|
||||
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1442745
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* Fixed some other edge cases for attribute URI value sanitizing and
|
||||
improved testing of this code.
|
||||
|
||||
|
||||
Version 2.1.2 (December 7th, 2017)
|
||||
----------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* Support html5lib-python 1.0.1. (#337)
|
||||
|
||||
* Add deprecation warning for supporting html5lib-python < 1.0.
|
||||
|
||||
* Switch to semver.
|
||||
|
||||
|
||||
Version 2.1.1 (October 2nd, 2017)
|
||||
---------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
None
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
None
|
||||
|
||||
**Features**
|
||||
|
||||
None
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* Fix ``setup.py`` opening files when ``LANG=``. (#324)
|
||||
|
||||
|
||||
Version 2.1 (September 28th, 2017)
|
||||
----------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
* Convert control characters (backspace particularly) to "?" preventing
|
||||
malicious copy-and-paste situations. (#298)
|
||||
|
||||
See `<https://github.com/mozilla/bleach/issues/298>`_ for more details.
|
||||
|
||||
This affects all previous versions of Bleach. Check the comments on that
|
||||
issue for ways to alleviate the issue if you can't upgrade to Bleach 2.1.
|
||||
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
* Redid versioning. ``bleach.VERSION`` is no longer available. Use the string
|
||||
version at ``bleach.__version__`` and parse it with
|
||||
``pkg_resources.parse_version``. (#307)
|
||||
|
||||
* clean, linkify: linkify and clean should only accept text types; thank you,
|
||||
Janusz! (#292)
|
||||
|
||||
* clean, linkify: accept only unicode or utf-8-encoded str (#176)
|
||||
|
||||
|
||||
**Features**
|
||||
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
* ``bleach.clean()`` no longer unescapes entities including ones that are missing
|
||||
a ``;`` at the end which can happen in urls and other places. (#143)
|
||||
|
||||
* linkify: fix http links inside of mailto links; thank you, sedrubal! (#300)
|
||||
|
||||
* clarify security policy in docs (#303)
|
||||
|
||||
* fix dependency specification for html5lib 1.0b8, 1.0b9, and 1.0b10; thank you,
|
||||
Zoltán! (#268)
|
||||
|
||||
* add Bleach vs. html5lib comparison to README; thank you, Stu Cox! (#278)
|
||||
|
||||
* fix KeyError exceptions on tags without href attr; thank you, Alex Defsen!
|
||||
(#273)
|
||||
|
||||
* add test website and scripts to test ``bleach.clean()`` output in browser;
|
||||
thank you, Greg Guthe!
|
||||
|
||||
|
||||
Version 2.0 (March 8th, 2017)
|
||||
-----------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
* None
|
||||
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
* Removed support for Python 2.6. #206
|
||||
|
||||
* Removed support for Python 3.2. #224
|
||||
|
||||
* Bleach no longer supports html5lib < 0.99999999 (8 9s).
|
||||
|
||||
This version is a rewrite to use the new sanitizing API since the old
|
||||
one was dropped in html5lib 0.99999999 (8 9s).
|
||||
|
||||
If you're using 0.9999999 (7 9s) upgrade to 0.99999999 (8 9s) or higher.
|
||||
|
||||
If you're using 1.0b8 (equivalent to 0.9999999 (7 9s)), upgrade to 1.0b9
|
||||
(equivalent to 0.99999999 (8 9s)) or higher.
|
||||
|
||||
* ``bleach.clean`` and friends were rewritten
|
||||
|
||||
``clean`` was reimplemented as an html5lib filter and happens at a different
|
||||
step in the HTML parsing -> traversing -> serializing process. Because of
|
||||
that, there are some differences in clean's output as compared with previous
|
||||
versions.
|
||||
|
||||
Amongst other things, this version will add end tags even if the tag in
|
||||
question is to be escaped.
|
||||
|
||||
* ``bleach.clean`` and friends attribute callables now take three arguments:
|
||||
tag, attribute name and attribute value. Previously they only took attribute
|
||||
name and attribute value.
|
||||
|
||||
All attribute callables will need to be updated.
|
||||
|
||||
* ``bleach.linkify`` was rewritten
|
||||
|
||||
``linkify`` was reimplemented as an html5lib Filter. As such, it no longer
|
||||
accepts a ``tokenizer`` argument.
|
||||
|
||||
The callback functions for adjusting link attributes now takes a namespaced
|
||||
attribute.
|
||||
|
||||
Previously you'd do something like this::
|
||||
|
||||
def check_protocol(attrs, is_new):
|
||||
if not attrs.get('href', '').startswith('http:', 'https:')):
|
||||
return None
|
||||
return attrs
|
||||
|
||||
Now it's more like this::
|
||||
|
||||
def check_protocol(attrs, is_new):
|
||||
if not attrs.get((None, u'href'), u'').startswith(('http:', 'https:')):
|
||||
# ^^^^^^^^^^^^^^^
|
||||
return None
|
||||
return attrs
|
||||
|
||||
Further, you need to make sure you're always using unicode values. If you
|
||||
don't then html5lib will raise an assertion error that the value is not
|
||||
unicode.
|
||||
|
||||
All linkify filters will need to be updated.
|
||||
|
||||
* ``bleach.linkify`` and friends had a ``skip_pre`` argument--that's been
|
||||
replaced with a more general ``skip_tags`` argument.
|
||||
|
||||
Before, you might do::
|
||||
|
||||
bleach.linkify(some_text, skip_pre=True)
|
||||
|
||||
The equivalent with Bleach 2.0 is::
|
||||
|
||||
bleach.linkify(some_text, skip_tags=['pre'])
|
||||
|
||||
You can skip other tags, too, like ``style`` or ``script`` or other places
|
||||
where you don't want linkification happening.
|
||||
|
||||
All uses of linkify that use ``skip_pre`` will need to be updated.
|
||||
|
||||
|
||||
**Changes**
|
||||
|
||||
* Supports Python 3.6.
|
||||
|
||||
* Supports html5lib >= 0.99999999 (8 9s).
|
||||
|
||||
* There's a ``bleach.sanitizer.Cleaner`` class that you can instantiate with your
|
||||
favorite clean settings for easy reuse.
|
||||
|
||||
* There's a ``bleach.linkifier.Linker`` class that you can instantiate with your
|
||||
favorite linkify settings for easy reuse.
|
||||
|
||||
* There's a ``bleach.linkifier.LinkifyFilter`` which is an htm5lib filter that
|
||||
you can pass as a filter to ``bleach.sanitizer.Cleaner`` allowing you to clean
|
||||
and linkify in one pass.
|
||||
|
||||
* ``bleach.clean`` and friends can now take a callable as an attributes arg value.
|
||||
|
||||
* Tons of bug fixes.
|
||||
|
||||
* Cleaned up tests.
|
||||
|
||||
* Documentation fixes.
|
||||
|
||||
|
||||
Version 1.5 (November 4th, 2016)
|
||||
--------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
* None
|
||||
|
||||
**Backwards incompatible changes**
|
||||
|
||||
* clean: The list of ``ALLOWED_PROTOCOLS`` now defaults to http, https and
|
||||
mailto.
|
||||
|
||||
Previously it was a long list of protocols something like ed2k, ftp, http,
|
||||
https, irc, mailto, news, gopher, nntp, telnet, webcal, xmpp, callto, feed,
|
||||
urn, aim, rsync, tag, ssh, sftp, rtsp, afs, data. #149
|
||||
|
||||
**Changes**
|
||||
|
||||
* clean: Added ``protocols`` to arguments list to let you override the list of
|
||||
allowed protocols. Thank you, Andreas Malecki! #149
|
||||
|
||||
* linkify: Fix a bug involving periods at the end of an email address. Thank you,
|
||||
Lorenz Schori! #219
|
||||
|
||||
* linkify: Fix linkification of non-ascii ports. Thank you Alexandre, Macabies!
|
||||
#207
|
||||
|
||||
* linkify: Fix linkify inappropriately removing node tails when dropping nodes.
|
||||
#132
|
||||
|
||||
* Fixed a test that failed periodically. #161
|
||||
|
||||
* Switched from nose to py.test. #204
|
||||
|
||||
* Add test matrix for all supported Python and html5lib versions. #230
|
||||
|
||||
* Limit to html5lib ``>=0.999,!=0.9999,!=0.99999,<0.99999999`` because 0.9999
|
||||
and 0.99999 are busted.
|
||||
|
||||
* Add support for ``python setup.py test``. #97
|
||||
|
||||
|
||||
Version 1.4.3 (May 23rd, 2016)
|
||||
------------------------------
|
||||
|
||||
**Security fixes**
|
||||
|
||||
* None
|
||||
|
||||
**Changes**
|
||||
|
||||
* Limit to html5lib ``>=0.999,<0.99999999`` because of impending change to
|
||||
sanitizer api. #195
|
||||
|
||||
|
||||
Version 1.4.2 (September 11, 2015)
|
||||
----------------------------------
|
||||
|
||||
**Changes**
|
||||
|
||||
* linkify: Fix hang in linkify with ``parse_email=True``. #124
|
||||
|
||||
* linkify: Fix crash in linkify when removing a link that is a first-child. #136
|
||||
|
||||
* Updated TLDs.
|
||||
|
||||
* linkify: Don't remove exterior brackets when linkifying. #146
|
||||
|
||||
|
||||
Version 1.4.1 (December 15, 2014)
|
||||
---------------------------------
|
||||
|
||||
**Changes**
|
||||
|
||||
* Consistent order of attributes in output.
|
||||
|
||||
* Python 3.4 support.
|
||||
|
||||
|
||||
Version 1.4 (January 12, 2014)
|
||||
------------------------------
|
||||
|
||||
**Changes**
|
||||
|
||||
* linkify: Update linkify to use etree type Treewalker instead of simpletree.
|
||||
|
||||
* Updated html5lib to version ``>=0.999``.
|
||||
|
||||
* Update all code to be compatible with Python 3 and 2 using six.
|
||||
|
||||
* Switch to Apache License.
|
||||
|
||||
|
||||
Version 1.3
|
||||
-----------
|
||||
|
||||
* Used by Python 3-only fork.
|
||||
|
||||
|
||||
Version 1.2.2 (May 18, 2013)
|
||||
----------------------------
|
||||
|
||||
* Pin html5lib to version 0.95 for now due to major API break.
|
||||
|
||||
|
||||
Version 1.2.1 (February 19, 2013)
|
||||
---------------------------------
|
||||
|
||||
* ``clean()`` no longer considers ``feed:`` an acceptable protocol due to
|
||||
inconsistencies in browser behavior.
|
||||
|
||||
|
||||
Version 1.2 (January 28, 2013)
|
||||
------------------------------
|
||||
|
||||
* ``linkify()`` has changed considerably. Many keyword arguments have been
|
||||
replaced with a single callbacks list. Please see the documentation for more
|
||||
information.
|
||||
|
||||
* Bleach will no longer consider unacceptable protocols when linkifying.
|
||||
|
||||
* ``linkify()`` now takes a tokenizer argument that allows it to skip
|
||||
sanitization.
|
||||
|
||||
* ``delinkify()`` is gone.
|
||||
|
||||
* Removed exception handling from ``_render``. ``clean()`` and ``linkify()`` may
|
||||
now throw.
|
||||
|
||||
* ``linkify()`` correctly ignores case for protocols and domain names.
|
||||
|
||||
* ``linkify()`` correctly handles markup within an <a> tag.
|
||||
|
||||
|
||||
Version 1.1.5
|
||||
-------------
|
||||
|
||||
|
||||
Version 1.1.4
|
||||
-------------
|
||||
|
||||
|
||||
Version 1.1.3 (July 10, 2012)
|
||||
-----------------------------
|
||||
|
||||
* Fix parsing bare URLs when parse_email=True.
|
||||
|
||||
|
||||
Version 1.1.2 (June 1, 2012)
|
||||
----------------------------
|
||||
|
||||
* Fix hang in style attribute sanitizer. (#61)
|
||||
|
||||
* Allow ``/`` in style attribute values.
|
||||
|
||||
|
||||
Version 1.1.1 (February 17, 2012)
|
||||
---------------------------------
|
||||
|
||||
* Fix tokenizer for html5lib 0.9.5.
|
||||
|
||||
|
||||
Version 1.1.0 (October 24, 2011)
|
||||
--------------------------------
|
||||
|
||||
* ``linkify()`` now understands port numbers. (#38)
|
||||
|
||||
* Documented character encoding behavior. (#41)
|
||||
|
||||
* Add an optional target argument to ``linkify()``.
|
||||
|
||||
* Add ``delinkify()`` method. (#45)
|
||||
|
||||
* Support subdomain whitelist for ``delinkify()``. (#47, #48)
|
||||
|
||||
|
||||
Version 1.0.4 (September 2, 2011)
|
||||
---------------------------------
|
||||
|
||||
* Switch to SemVer git tags.
|
||||
|
||||
* Make ``linkify()`` smarter about trailing punctuation. (#30)
|
||||
|
||||
* Pass ``exc_info`` to logger during rendering issues.
|
||||
|
||||
* Add wildcard key for attributes. (#19)
|
||||
|
||||
* Make ``linkify()`` use the ``HTMLSanitizer`` tokenizer. (#36)
|
||||
|
||||
* Fix URLs wrapped in parentheses. (#23)
|
||||
|
||||
* Make ``linkify()`` UTF-8 safe. (#33)
|
||||
|
||||
|
||||
Version 1.0.3 (June 14, 2011)
|
||||
-----------------------------
|
||||
|
||||
* ``linkify()`` works with 3rd level domains. (#24)
|
||||
|
||||
* ``clean()`` supports vendor prefixes in style values. (#31, #32)
|
||||
|
||||
* Fix ``linkify()`` email escaping.
|
||||
|
||||
|
||||
Version 1.0.2 (June 6, 2011)
|
||||
----------------------------
|
||||
|
||||
* ``linkify()`` supports email addresses.
|
||||
|
||||
* ``clean()`` supports callables in attributes filter.
|
||||
|
||||
|
||||
Version 1.0.1 (April 12, 2011)
|
||||
------------------------------
|
||||
|
||||
* ``linkify()`` doesn't drop trailing slashes. (#21)
|
||||
* ``linkify()`` won't linkify 'libgl.so.1'. (#22)
|
||||
|
||||
|
95
venv/Lib/site-packages/bleach-3.2.1.dist-info/RECORD
Normal file
95
venv/Lib/site-packages/bleach-3.2.1.dist-info/RECORD
Normal file
|
@ -0,0 +1,95 @@
|
|||
bleach-3.2.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
bleach-3.2.1.dist-info/LICENSE,sha256=vsIjjBSaYyuPsmgT9oes6rq4AyfzJwdpwsFhV4g9MTA,569
|
||||
bleach-3.2.1.dist-info/METADATA,sha256=okp9XfO47h6Mol3hm2tO-gG_UjW44IVssiu_2rf_tnA,22436
|
||||
bleach-3.2.1.dist-info/RECORD,,
|
||||
bleach-3.2.1.dist-info/WHEEL,sha256=ADKeyaGyKF5DwBNE0sRE5pvW-bSkFMJfBuhzZ3rceP4,110
|
||||
bleach-3.2.1.dist-info/top_level.txt,sha256=dcv0wKIySB0zMjAEXLwY4V0-3IN9UZQGAT1wDmfQICY,7
|
||||
bleach/__init__.py,sha256=DKfG5fDzjNYEevf__3DxOsuepruPCS7w62VgYFiT95Q,3753
|
||||
bleach/__pycache__/__init__.cpython-36.pyc,,
|
||||
bleach/__pycache__/callbacks.cpython-36.pyc,,
|
||||
bleach/__pycache__/html5lib_shim.cpython-36.pyc,,
|
||||
bleach/__pycache__/linkifier.cpython-36.pyc,,
|
||||
bleach/__pycache__/sanitizer.cpython-36.pyc,,
|
||||
bleach/__pycache__/utils.cpython-36.pyc,,
|
||||
bleach/_vendor/README.rst,sha256=MDwr72d8X2KY529tKjUTwpCjODtaQUN9Oiy8z-Z-sLU,1372
|
||||
bleach/_vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
bleach/_vendor/__pycache__/__init__.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib-1.1.dist-info/AUTHORS.rst,sha256=DrNAMifoDpuQyJn-KW-H6K8Tt2a5rKnV2UF4-DRrGUI,983
|
||||
bleach/_vendor/html5lib-1.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
bleach/_vendor/html5lib-1.1.dist-info/METADATA,sha256=Y3w-nd_22HQnQRy3yypVsV_ke2FF94uUD4-vGpc2DnI,16076
|
||||
bleach/_vendor/html5lib-1.1.dist-info/RECORD,sha256=u-y_W5lhdsHC1OSMnA4bCi3-11IgQ_FAIW6viMu8_LA,3486
|
||||
bleach/_vendor/html5lib-1.1.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
|
||||
bleach/_vendor/html5lib-1.1.dist-info/top_level.txt,sha256=XEX6CHpskSmvjJB4tP6m4Q5NYXhIf_0ceMc0PNbzJPQ,9
|
||||
bleach/_vendor/html5lib/__init__.py,sha256=pWnYcfZ69wNLrdQL7bpr49FUi8O8w0KhKCOHsyRgYGQ,1143
|
||||
bleach/_vendor/html5lib/__pycache__/__init__.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/__pycache__/_ihatexml.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/__pycache__/_inputstream.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/__pycache__/_tokenizer.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/__pycache__/_utils.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/__pycache__/constants.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/__pycache__/html5parser.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/__pycache__/serializer.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/_ihatexml.py,sha256=ifOwF7pXqmyThIXc3boWc96s4MDezqRrRVp7FwDYUFs,16728
|
||||
bleach/_vendor/html5lib/_inputstream.py,sha256=IKuMiY8rzb7pqIGCpbvTqsxysLEpgEHWYvYEFu4LUAI,32300
|
||||
bleach/_vendor/html5lib/_tokenizer.py,sha256=WvJQa2Mli4NtTmhLXkX8Jy5FcWttqCaiDTiKyaw8D-k,77028
|
||||
bleach/_vendor/html5lib/_trie/__init__.py,sha256=nqfgO910329BEVJ5T4psVwQtjd2iJyEXQ2-X8c1YxwU,109
|
||||
bleach/_vendor/html5lib/_trie/__pycache__/__init__.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/_trie/__pycache__/_base.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/_trie/__pycache__/py.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/_trie/_base.py,sha256=CaybYyMro8uERQYjby2tTeSUatnWDfWroUN9N7ety5w,1013
|
||||
bleach/_vendor/html5lib/_trie/py.py,sha256=zg7RZSHxJ8mLmuI_7VEIV8AomISrgkvqCP477AgXaG0,1763
|
||||
bleach/_vendor/html5lib/_utils.py,sha256=AxAJSG15eyarCgKMnlUwzs1X6jFHXqEvhlYEOxAFmis,4919
|
||||
bleach/_vendor/html5lib/constants.py,sha256=Ll-yzLU_jcjyAI_h57zkqZ7aQWE5t5xA4y_jQgoUUhw,83464
|
||||
bleach/_vendor/html5lib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
bleach/_vendor/html5lib/filters/__pycache__/__init__.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/filters/__pycache__/alphabeticalattributes.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/filters/__pycache__/base.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/filters/__pycache__/inject_meta_charset.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/filters/__pycache__/lint.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/filters/__pycache__/optionaltags.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/filters/__pycache__/sanitizer.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/filters/__pycache__/whitespace.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/filters/alphabeticalattributes.py,sha256=lViZc2JMCclXi_5gduvmdzrRxtO5Xo9ONnbHBVCsykU,919
|
||||
bleach/_vendor/html5lib/filters/base.py,sha256=z-IU9ZAYjpsVsqmVt7kuWC63jR11hDMr6CVrvuao8W0,286
|
||||
bleach/_vendor/html5lib/filters/inject_meta_charset.py,sha256=egDXUEHXmAG9504xz0K6ALDgYkvUrC2q15YUVeNlVQg,2945
|
||||
bleach/_vendor/html5lib/filters/lint.py,sha256=upXATs6By7cot7o0bnNqR15sPq2Fn6Vnjvoy3gyO_rY,3631
|
||||
bleach/_vendor/html5lib/filters/optionaltags.py,sha256=8lWT75J0aBOHmPgfmqTHSfPpPMp01T84NKu0CRedxcE,10588
|
||||
bleach/_vendor/html5lib/filters/sanitizer.py,sha256=XGNSdzIqDTaHot1V-rRj1V_XOolApJ7n95tHP9JcgNU,26885
|
||||
bleach/_vendor/html5lib/filters/whitespace.py,sha256=8eWqZxd4UC4zlFGW6iyY6f-2uuT8pOCSALc3IZt7_t4,1214
|
||||
bleach/_vendor/html5lib/html5parser.py,sha256=w5hZJh0cvD3g4CS196DiTmuGpSKCMYe1GS46-yf_WZQ,117174
|
||||
bleach/_vendor/html5lib/serializer.py,sha256=K2kfoLyMPMFPfdusfR30SrxNkf0mJB92-P5_RntyaaI,15747
|
||||
bleach/_vendor/html5lib/treeadapters/__init__.py,sha256=18hyI-at2aBsdKzpwRwa5lGF1ipgctaTYXoU9En2ZQg,650
|
||||
bleach/_vendor/html5lib/treeadapters/__pycache__/__init__.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treeadapters/__pycache__/genshi.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treeadapters/__pycache__/sax.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treeadapters/genshi.py,sha256=CH27pAsDKmu4ZGkAUrwty7u0KauGLCZRLPMzaO3M5vo,1715
|
||||
bleach/_vendor/html5lib/treeadapters/sax.py,sha256=BKS8woQTnKiqeffHsxChUqL4q2ZR_wb5fc9MJ3zQC8s,1776
|
||||
bleach/_vendor/html5lib/treebuilders/__init__.py,sha256=AysSJyvPfikCMMsTVvaxwkgDieELD5dfR8FJIAuq7hY,3592
|
||||
bleach/_vendor/html5lib/treebuilders/__pycache__/__init__.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treebuilders/__pycache__/base.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treebuilders/__pycache__/dom.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treebuilders/__pycache__/etree.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treebuilders/__pycache__/etree_lxml.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treebuilders/base.py,sha256=oeZNGEB-kt90YJGVH05gb5a8E7ids2AbYwGRsVCieWk,14553
|
||||
bleach/_vendor/html5lib/treebuilders/dom.py,sha256=22whb0C71zXIsai5mamg6qzBEiigcBIvaDy4Asw3at0,8925
|
||||
bleach/_vendor/html5lib/treebuilders/etree.py,sha256=EbmHx-wQ-11MVucTPtF7Ul92-mQGN3Udu_KfDn-Ifhk,12824
|
||||
bleach/_vendor/html5lib/treebuilders/etree_lxml.py,sha256=OazDHZGO_q4FnVs4Dhs4hzzn2JwGAOs-rfV8LAlUGW4,14754
|
||||
bleach/_vendor/html5lib/treewalkers/__init__.py,sha256=OBPtc1TU5mGyy18QDMxKEyYEz0wxFUUNj5v0-XgmYhY,5719
|
||||
bleach/_vendor/html5lib/treewalkers/__pycache__/__init__.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treewalkers/__pycache__/base.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treewalkers/__pycache__/dom.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treewalkers/__pycache__/etree.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treewalkers/__pycache__/etree_lxml.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treewalkers/__pycache__/genshi.cpython-36.pyc,,
|
||||
bleach/_vendor/html5lib/treewalkers/base.py,sha256=ouiOsuSzvI0KgzdWP8PlxIaSNs9falhbiinAEc_UIJY,7476
|
||||
bleach/_vendor/html5lib/treewalkers/dom.py,sha256=EHyFR8D8lYNnyDU9lx_IKigVJRyecUGua0mOi7HBukc,1413
|
||||
bleach/_vendor/html5lib/treewalkers/etree.py,sha256=gkD4tfEfRWPsEGvgHHJxZmKZXUvBzVVGz3v5C_MIiOE,4539
|
||||
bleach/_vendor/html5lib/treewalkers/etree_lxml.py,sha256=eLedbn6nPjlpebibsWVijey7WEpzDwxU3ubwUoudBuA,6345
|
||||
bleach/_vendor/html5lib/treewalkers/genshi.py,sha256=4D2PECZ5n3ZN3qu3jMl9yY7B81jnQApBQSVlfaIuYbA,2309
|
||||
bleach/_vendor/pip_install_vendor.sh,sha256=ZrS4exm9McHoXsmpgOFHP9li6KVCN5aBeEq7G64CODY,90
|
||||
bleach/_vendor/vendor.txt,sha256=6FFZyenumgWqnhLgbCa4yzL4HVNaSUDC2DHNyR5Fy6w,184
|
||||
bleach/callbacks.py,sha256=cOniOdppTr3dAzqqcTt2xQjObgzmV2iOJPqSe-N9Qq4,792
|
||||
bleach/html5lib_shim.py,sha256=lUr_iZci0EO0gfe-PTS8XdgQR8JSa-lYTbt8rL7S1vE,19837
|
||||
bleach/linkifier.py,sha256=f4lQNChZS24_78t9xyp8Z-S_ja5qo6rVAWoOB6Z7ob8,20150
|
||||
bleach/sanitizer.py,sha256=7BSKVXGZvVXhJtBzHrnBroFwhTVaF_KQOgTsZAly1Nc,21767
|
||||
bleach/utils.py,sha256=0x1a1cHpYCKewXAuPP51mzUEy10E6r9izl8ESXnfyKk,1101
|
6
venv/Lib/site-packages/bleach-3.2.1.dist-info/WHEEL
Normal file
6
venv/Lib/site-packages/bleach-3.2.1.dist-info/WHEEL
Normal file
|
@ -0,0 +1,6 @@
|
|||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.35.1)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
|
@ -0,0 +1 @@
|
|||
bleach
|
Loading…
Add table
Add a link
Reference in a new issue