Up to [cvs.NetBSD.org] / pkgsrc / www / py-bleach
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
py-*: remove unused tool dependency py-setuptools includes the py-wheel functionality nowadays
py-bleach: updated to 6.2.0 Version 6.2.0 (October 29th, 2024) **Backwards incompatible changes** * Dropped support for Python 3.8. **Security fixes** None **Bug fixes** * Add support for Python 3.13. * Remove six depdenncy. * Update known-good versions for tinycss2. * Fix additional < followed by characters and EOF issues.
py-bleach: convert to wheel.mk Remove unused test dependency. Bump PKGREVISION.
py-bleach: updated to 6.1.0 Version 6.1.0 (October 6th, 2023) --------------------------------- **Backwards incompatible changes** * Dropped support for Python 3.7. **Security fixes** None **Bug fixes** * Add support for Python 3.12. * Fix linkify with arrays in querystring * Handle more cases with < followed by character data * Fix entities inside a tags in linkification * Update cap for tinycss2 to <1.3 * Updated Sphinx requirement * Add dependabot for github actions and update github actions
py-bleach: fix filename in REPLACE_SH
py-bleach: updated to 6.0.0 Version 6.0.0 (January 23rd, 2023) ---------------------------------- **Backwards incompatible changes** * ``bleach.clean``, ``bleach.sanitizer.Cleaner``, ``bleach.html5lib_shim.BleachHTMLParser``: the ``tags`` and ``protocols`` arguments were changed from lists to sets. Old pre-6.0.0: .. code-block:: python bleach.clean( "some text", tags=["a", "p", "img"], # ^ ^ list protocols=["http", "https"], # ^ ^ list ) New 6.0.0 and later: .. code-block:: python bleach.clean( "some text", tags={"a", "p", "img"}, # ^ ^ set protocols={"http", "https"}, # ^ ^ set ) * ``bleach.linkify``, ``bleach.linkifier.Linker``: the ``skip_tags`` and ``recognized_tags`` arguments were changed from lists to sets. Old pre-6.0.0: .. code-block:: python bleach.linkify( "some text", skip_tags=["pre"], # ^ ^ list ) linker = Linker( skip_tags=["pre"], # ^ ^ list recognized_tags=html5lib_shim.HTML_TAGS + ["custom-element"], # ^ ^ ^ list # | # | list concatenation ) New 6.0.0 and later: .. code-block:: python bleach.linkify( "some text", skip_tags={"pre"}, # ^ ^ set ) linker = Linker( skip_tags={"pre"}, # ^ ^ set recognized_tags=html5lib_shim.HTML_TAGS | {"custom-element"}, # ^ ^ ^ set # | # | union operator ) * ``bleach.sanitizer.BleachSanitizerFilter``: ``strip_allowed_elements`` is now ``strip_allowed_tags``. We now use "tags" everywhere rather than a mishmash of "tags" in some places and "elements" in others. **Security fixes** None **Bug fixes** * Add support for Python 3.11. * Fix API weirness in ``BleachSanitizerFilter``. We're using "tags" instead of "elements" everywhere--no more weird overloading of "elements" anymore. Also, it no longer calls the superclass constructor. * Add warning when ``css_sanitizer`` isn't set, but the ``style`` attribute is allowed. * Fix linkify handling of character entities. * Rework dev dependencies to use ``requirements-dev.txt`` and ``requirements-flake8.txt`` instead of extras. * Fix project infrastructure to be tox-based so it's easier to have CI run the same things we're running in development and with flake8 in an isolated environment. * Update action versions in CI. * Switch to f-strings where possible. Make tests parametrized to be easier to read/maintain.
py-bleach: only for python 2
*: bump PKGREVISION for egg.mk users They now have a tool dependency on py-setuptools instead of a DEPENDS
*: convert packaging to lang/python/versioned_dependencies.mk
py-bleach: updated to 3.3.1 Version 3.3.1 (July 14th, 2021) ------------------------------- **Features** * add more tests for CVE-2021-23980 / GHSA-vv2x-vrpj-qqpq * bump python version to 3.8 for tox doc, vendorverify, and lint targets * update bug report template tag * update vendorverify script to detect and fail when extra files are vendored * update release process docs to check vendorverify passes locally **Bug fixes** * remove extra vendored django present in the v3.3.0 whl * duplicate h1 header doc fix
py-bleach: updated to 3.3.0 Version 3.3.0 (February 1st, 2021) ---------------------------------- **Backwards incompatible changes** * clean escapes HTML comments even when strip_comments=False **Security fixes** * Fix bug 1621692 / GHSA-m6xf-fq7q-8743. See the advisory for details.
py-bleach: updated to 3.2.3 Version 3.2.3 (January 26th, 2021) ---------------------------------- **Security fixes** None **Features** None **Bug fixes** * fix clean and linkify raising ValueErrors for certain inputs. Version 3.2.2 (January 20th, 2021) ---------------------------------- **Security fixes** None **Features** * Migrate CI to Github Actions. **Bug fixes** * fix linkify raising an IndexError on certain inputs.
py-bleach: updated to 3.2.1 Version 3.2.1 * change linkifier to add rel="nofollow" as documented. * suppress html5lib sanitizer DeprecationWarnings Version 3.2.0 * ``html5lib`` dependency to version 1.1.0. * update tests_website terminology.
www/py-bleach: Add missing dependency
pytest from versioned depends
py-bleach: updated to 3.1.5 Version 3.1.5: Bug fixes * replace missing ``setuptools`` dependency with ``packaging``.
py-bleach: updated to 3.1.4 Version 3.1.4: 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. Backwards incompatible changes * Style attributes with dashes, or single or double quoted values are cleaned instead of passed through.
py-bleach: updated to 3.1.3 Version 3.1.3: **Features** * Add relative link to code of conduct. * Drop deprecated 'setup.py test' support. * Fix typo: curren -> current in tests/test_clean.py * Test on PyPy 7 * Drop test support for end of life Python 3.4 Version 3.1.2: **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. Version 3.1.1: **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.
py-bleach: updated to 3.1.0 Version 3.1.0: **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. **Bug fixes** * Add six>=1.9 to requirements. * Fix cases where attribute names could have invalid characters in them. * Fix problems with LinkifyFilter not being able to match links across &. * Fix InputStreamWithMemory when the BleachHTMLParser is parsing meta tags. * Fix doctests.
Deal with gratuitous use of "/bin/bash" (in a one-line script, no less).
py-bleach: updated to 3.0.2 Version 3.0.2: Bug fixes Merge Characters tokens after sanitizing them. This fixes issues in the LinkifyFilter where it was only linkifying parts of urls. Version 3.0.1: 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. Bug fixes Fix list object has no attribute lower in clean. Fix abbr getting escaped in linkify. Version 3.0.0: 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. Bug fixes Fixed tags getting added when using clean or linkify. This was a long-standing regression from the Bleach 2.0 rewrite. Fixed <isindex> getting replaced with a string. Now it gets escaped or stripped depending on whether it's in the allowed tags or not.
py-bleach: updated to 2.1.4 Version 2.1.4: Dropped support for Python 3.3. Handle ambiguous ampersands in correctly.
py-bleach: updated to 2.1.3 Version 2.1.3: **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. **Bug fixes** * Fixed some other edge cases for attribute URI value sanitizing and improved testing of this code.
py-bleach: updated to 2.1.2 Version 2.1.2: Bug fixes * Support html5lib-python 1.0.1. * Add deprecation warning for supporting html5lib-python < 1.0. * Switch to semver.
py-bleach: update to 2.1.1 Version 2.1.1: **Bug fixes** * Fix ``setup.py`` opening files when ``LANG=``. Version 2.1: **Security fixes** * Convert control characters (backspace particularly) to "?" preventing malicious copy-and-paste situations. 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``. * clean, linkify: linkify and clean should only accept text types * clean, linkify: accept only unicode or utf-8-encoded str **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. * linkify: fix http links inside of mailto links * clarify security policy in docs * fix dependency specification for html5lib 1.0b8, 1.0b9, and 1.0b10 * add Bleach vs. html5lib comparison to README * fix KeyError exceptions on tags without href attr * add test website and scripts to test ``bleach.clean()`` output in browser
Update py-bleach to 2.0.0 * 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) **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. **Changes** - clean: Added ``protocols`` to arguments list to let you override the list of allowed protocols. Thank you, Andreas Malecki! - linkify: Fix a bug involving periods at the end of an email address. Thank you, Lorenz Schori! - linkify: Fix linkification of non-ascii ports. Thank you Alexandre, Macabies! - linkify: Fix linkify inappropriately removing node tails when dropping nodes. - Fixed a test that failed periodically. - Switched from nose to py.test. - Add test matrix for all supported Python and html5lib versions. - 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``.
Switch to MASTER_SITES_PYPI.
Update to 1.4: Version 1.4 ----------- - Update linkify to use etree type Treeewalker 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 ------------- - Pin html5lib to version 0.95 for now due to major API break. Version 1.2.1 ------------- - clean() no longer considers "feed:" an acceptable protocol due to inconsistencies in browser behavior. Version 1.2 ----------- - 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.
Bump PKGREVISION. * Add missing dependencies. Thank you, joerg@.
Import py27-bleach-1.1.5 as www/py-bleach. 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.