diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-02-17 09:08:38 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2024-02-17 09:24:32 +0300 |
commit | fc33b9e4ce81dc99d8a2bc35b88aa08aec42b6a0 (patch) | |
tree | 3ec84abe5af5c139c7183bb27aa822a138e49f92 | |
parent | f526b067d7e870d5fe56d14d523577fb3e54fd43 (diff) | |
download | ydb-fc33b9e4ce81dc99d8a2bc35b88aa08aec42b6a0.tar.gz |
Update contrib/python/MarkupSafe/py3 to 2.1.5
c95a7bd6addacfa0dd622f5719405eccc20c4f9d
4 files changed, 7 insertions, 6 deletions
diff --git a/contrib/python/MarkupSafe/py3/.dist-info/METADATA b/contrib/python/MarkupSafe/py3/.dist-info/METADATA index c221b8e50e..dfe37d52df 100644 --- a/contrib/python/MarkupSafe/py3/.dist-info/METADATA +++ b/contrib/python/MarkupSafe/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: MarkupSafe -Version: 2.1.4 +Version: 2.1.5 Summary: Safely add untrusted strings to HTML/XML markup. Home-page: https://palletsprojects.com/p/markupsafe/ Maintainer: Pallets diff --git a/contrib/python/MarkupSafe/py3/markupsafe/__init__.py b/contrib/python/MarkupSafe/py3/markupsafe/__init__.py index 2f401a8153..b40f24c66d 100644 --- a/contrib/python/MarkupSafe/py3/markupsafe/__init__.py +++ b/contrib/python/MarkupSafe/py3/markupsafe/__init__.py @@ -13,7 +13,7 @@ if t.TYPE_CHECKING: _P = te.ParamSpec("_P") -__version__ = "2.1.4" +__version__ = "2.1.5" def _simple_escaping_wrapper(func: "t.Callable[_P, str]") -> "t.Callable[_P, Markup]": @@ -158,8 +158,7 @@ class Markup(str): >>> Markup("Main »\t<em>About</em>").striptags() 'Main ยป About' """ - # collapse spaces - value = " ".join(self.split()) + value = str(self) # Look for comments then tags separately. Otherwise, a comment that # contains a tag would end early, leaving some of the comment behind. @@ -193,6 +192,8 @@ class Markup(str): value = f"{value[:start]}{value[end + 1:]}" + # collapse spaces + value = " ".join(value.split()) return self.__class__(value).unescape() @classmethod diff --git a/contrib/python/MarkupSafe/py3/tests/test_markupsafe.py b/contrib/python/MarkupSafe/py3/tests/test_markupsafe.py index ea9a91873c..94bea38795 100644 --- a/contrib/python/MarkupSafe/py3/tests/test_markupsafe.py +++ b/contrib/python/MarkupSafe/py3/tests/test_markupsafe.py @@ -73,7 +73,7 @@ def test_escaping(escape): Markup( "<!-- outer comment -->" "<em>Foo & Bar" - "<!-- inner comment about <em> -->" + " <!-- inner comment about <em> -->\n " "</em>" "<!-- comment\nwith\nnewlines\n-->" "<meta content='tag\nwith\nnewlines'>" diff --git a/contrib/python/MarkupSafe/py3/ya.make b/contrib/python/MarkupSafe/py3/ya.make index 3583a8035e..f1664c93e8 100644 --- a/contrib/python/MarkupSafe/py3/ya.make +++ b/contrib/python/MarkupSafe/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(2.1.4) +VERSION(2.1.5) LICENSE(BSD-3-Clause) |