diff options
author | David Lord <davidism@gmail.com> | 2022-06-13 08:20:12 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2022-06-13 08:20:12 -0700 |
commit | 12dae101d29425725ff99755c62259bb4ece5319 (patch) | |
tree | 2ec8db05cee772fa935cedcb5a61a54542558f32 | |
parent | 54588b629f6ccf1404e426ac2150a799da18e35b (diff) | |
parent | 58fafb063997c5025c98cf9a025dee3e20d01674 (diff) | |
download | markupsafe-12dae101d29425725ff99755c62259bb4ece5319.tar.gz |
Merge branch '2.1.x'
-rw-r--r-- | .pre-commit-config.yaml | 4 | ||||
-rw-r--r-- | CHANGES.rst | 9 | ||||
-rw-r--r-- | requirements/dev.txt | 10 | ||||
-rw-r--r-- | requirements/docs.txt | 12 | ||||
-rw-r--r-- | requirements/tests.txt | 2 | ||||
-rw-r--r-- | requirements/typing.txt | 2 | ||||
-rw-r--r-- | src/markupsafe/__init__.py | 6 | ||||
-rw-r--r-- | tests/test_markupsafe.py | 2 |
8 files changed, 29 insertions, 18 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7ddad9..1d3246f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ ci: autoupdate_schedule: monthly repos: - repo: https://github.com/asottile/pyupgrade - rev: v2.32.0 + rev: v2.34.0 hooks: - id: pyupgrade args: ["--py37-plus"] @@ -27,7 +27,7 @@ repos: hooks: - id: pip-compile-multi-verify - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.3.0 hooks: - id: fix-byte-order-marker - id: trailing-whitespace diff --git a/CHANGES.rst b/CHANGES.rst index 0c6793a..e1a558f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +Version 2.1.2 +------------- + +Unreleased + +- Fix ``striptags`` not stripping tags containing newlines. + :issue:`310` + + Version 2.1.1 ------------- diff --git a/requirements/dev.txt b/requirements/dev.txt index c9bcd60..bb9bf0f 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -10,17 +10,17 @@ -r typing.txt cfgv==3.3.1 # via pre-commit -click==8.1.2 +click==8.1.3 # via # pip-compile-multi # pip-tools distlib==0.3.4 # via virtualenv -filelock==3.6.0 +filelock==3.7.1 # via # tox # virtualenv -identify==2.5.0 +identify==2.5.1 # via pre-commit nodeenv==1.6.0 # via pre-commit @@ -28,11 +28,11 @@ pep517==0.12.0 # via pip-tools pip-compile-multi==2.4.5 # via -r requirements/dev.in -pip-tools==6.6.0 +pip-tools==6.6.2 # via pip-compile-multi platformdirs==2.5.2 # via virtualenv -pre-commit==2.18.1 +pre-commit==2.19.0 # via -r requirements/dev.in pyyaml==6.0 # via pre-commit diff --git a/requirements/docs.txt b/requirements/docs.txt index 88f6279..0faf1ab 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -9,17 +9,17 @@ alabaster==0.7.12 # via sphinx babel==2.10.1 # via sphinx -certifi==2021.10.8 +certifi==2022.5.18.1 # via requests charset-normalizer==2.0.12 # via requests -docutils==0.17.1 +docutils==0.18.1 # via sphinx idna==3.3 # via requests imagesize==1.3.0 # via sphinx -jinja2==3.1.1 +jinja2==3.1.2 # via sphinx markupsafe==2.1.1 # via jinja2 @@ -31,15 +31,15 @@ pallets-sphinx-themes==2.0.2 # via -r requirements/docs.in pygments==2.12.0 # via sphinx -pyparsing==3.0.8 +pyparsing==3.0.9 # via packaging pytz==2022.1 # via babel -requests==2.27.1 +requests==2.28.0 # via sphinx snowballstemmer==2.2.0 # via sphinx -sphinx==4.5.0 +sphinx==5.0.1 # via # -r requirements/docs.in # pallets-sphinx-themes diff --git a/requirements/tests.txt b/requirements/tests.txt index 4cd3fe9..753d04a 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -15,7 +15,7 @@ pluggy==1.0.0 # via pytest py==1.11.0 # via pytest -pyparsing==3.0.8 +pyparsing==3.0.9 # via packaging pytest==7.1.2 # via -r requirements/tests.in diff --git a/requirements/typing.txt b/requirements/typing.txt index 2d97fef..5126f10 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -5,7 +5,7 @@ # # pip-compile-multi # -mypy==0.950 +mypy==0.961 # via -r requirements/typing.in mypy-extensions==0.4.3 # via mypy diff --git a/src/markupsafe/__init__.py b/src/markupsafe/__init__.py index 0f1c4f4..1f9d8cd 100644 --- a/src/markupsafe/__init__.py +++ b/src/markupsafe/__init__.py @@ -11,10 +11,10 @@ if t.TYPE_CHECKING: pass -__version__ = "2.1.1" +__version__ = "2.1.2.dev0" -_strip_comments_re = re.compile(r"<!--.*?-->") -_strip_tags_re = re.compile(r"<.*?>") +_strip_comments_re = re.compile(r"<!--.*?-->", re.DOTALL) +_strip_tags_re = re.compile(r"<.*?>", re.DOTALL) def _simple_escaping_wrapper(name: str) -> t.Callable[..., "Markup"]: diff --git a/tests/test_markupsafe.py b/tests/test_markupsafe.py index 236f35e..a62ebf9 100644 --- a/tests/test_markupsafe.py +++ b/tests/test_markupsafe.py @@ -75,6 +75,8 @@ def test_escaping(escape): "<em>Foo & Bar" "<!-- inner comment about <em> -->" "</em>" + "<!-- comment\nwith\nnewlines\n-->" + "<meta content='tag\nwith\nnewlines'>" ).striptags() == "Foo & Bar" ) |