aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-04-01 17:29:54 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-04-01 17:29:54 +0300
commitfb2415cc585e4a674a63b8bacf75a3059f27a6a0 (patch)
tree50a296c2922f340bd9962908b1ff6dd3cecf8143
parent3d23aea57287cebf25f327f41cad3624ec33e0c6 (diff)
downloadydb-fb2415cc585e4a674a63b8bacf75a3059f27a6a0.tar.gz
intermediate changes
ref:56a8fc047a6219a99d08b5290f538eadde605502
-rw-r--r--build/rules/autocheck.blacklist1
-rw-r--r--build/ymake.core.conf2
-rw-r--r--contrib/python/MarkupSafe/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/MarkupSafe/py3/markupsafe/__init__.py12
-rw-r--r--contrib/python/MarkupSafe/py3/tests/test_markupsafe.py10
5 files changed, 20 insertions, 7 deletions
diff --git a/build/rules/autocheck.blacklist b/build/rules/autocheck.blacklist
index b58222bb99..68860aeb3c 100644
--- a/build/rules/autocheck.blacklist
+++ b/build/rules/autocheck.blacklist
@@ -34,3 +34,4 @@ ci/registry
market/front/apps
classifieds/verticals-backend
classifieds/schema-registry
+devtools/experimental/repo/REPO-33/torture
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 17ce48d412..b70f3ccf2f 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -10,7 +10,7 @@ FAKEID=3141592653
SANDBOX_FAKEID=${FAKEID}.7600000
CPP_FAKEID=9278195
-GO_FAKEID=9056219
+GO_FAKEID=9300436
ANDROID_FAKEID=8821472
CLANG_TIDY_FAKEID=8625699
diff --git a/contrib/python/MarkupSafe/py3/.dist-info/METADATA b/contrib/python/MarkupSafe/py3/.dist-info/METADATA
index 0c81a12c40..485a5e06ff 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.0
+Version: 2.1.1
Summary: Safely add untrusted strings to HTML/XML markup.
Home-page: https://palletsprojects.com/p/markupsafe/
Author: Armin Ronacher
diff --git a/contrib/python/MarkupSafe/py3/markupsafe/__init__.py b/contrib/python/MarkupSafe/py3/markupsafe/__init__.py
index 2acb04e47b..0f1c4f4695 100644
--- a/contrib/python/MarkupSafe/py3/markupsafe/__init__.py
+++ b/contrib/python/MarkupSafe/py3/markupsafe/__init__.py
@@ -11,9 +11,10 @@ if t.TYPE_CHECKING:
pass
-__version__ = "2.1.0"
+__version__ = "2.1.1"
-_striptags_re = re.compile(r"(<!--.*?-->|<[^>]*>)")
+_strip_comments_re = re.compile(r"<!--.*?-->")
+_strip_tags_re = re.compile(r"<.*?>")
def _simple_escaping_wrapper(name: str) -> t.Callable[..., "Markup"]:
@@ -158,8 +159,11 @@ class Markup(str):
>>> Markup("Main &raquo;\t<em>About</em>").striptags()
'Main ยป About'
"""
- stripped = " ".join(_striptags_re.sub("", self).split())
- return Markup(stripped).unescape()
+ # Use two regexes to avoid ambiguous matches.
+ value = _strip_comments_re.sub("", self)
+ value = _strip_tags_re.sub("", value)
+ value = " ".join(value.split())
+ return Markup(value).unescape()
@classmethod
def escape(cls, s: t.Any) -> "Markup":
diff --git a/contrib/python/MarkupSafe/py3/tests/test_markupsafe.py b/contrib/python/MarkupSafe/py3/tests/test_markupsafe.py
index 2f13885406..236f35e7b3 100644
--- a/contrib/python/MarkupSafe/py3/tests/test_markupsafe.py
+++ b/contrib/python/MarkupSafe/py3/tests/test_markupsafe.py
@@ -69,7 +69,15 @@ def test_dict_interpol():
def test_escaping(escape):
assert escape("\"<>&'") == "&#34;&lt;&gt;&amp;&#39;"
- assert Markup("<em>Foo &amp; Bar</em>").striptags() == "Foo & Bar"
+ assert (
+ Markup(
+ "<!-- outer comment -->"
+ "<em>Foo &amp; Bar"
+ "<!-- inner comment about <em> -->"
+ "</em>"
+ ).striptags()
+ == "Foo & Bar"
+ )
def test_unescape():