diff --git a/cookbook/helper/template_helper.py b/cookbook/helper/template_helper.py index f709dccc..4eb4b98c 100644 --- a/cookbook/helper/template_helper.py +++ b/cookbook/helper/template_helper.py @@ -1,6 +1,6 @@ import bleach import markdown as md -from bleach_whitelist import markdown_attrs, markdown_tags +from bleach_allowlist import markdown_attrs, markdown_tags from cookbook.helper.mdx_attributes import MarkdownFormatExtension from cookbook.helper.mdx_urlize import UrlizeExtension from jinja2 import Template, TemplateSyntaxError diff --git a/cookbook/templatetags/custom_tags.py b/cookbook/templatetags/custom_tags.py index 8e225c7a..7e1db00e 100644 --- a/cookbook/templatetags/custom_tags.py +++ b/cookbook/templatetags/custom_tags.py @@ -1,6 +1,6 @@ import bleach import markdown as md -from bleach_whitelist import markdown_attrs, markdown_tags +from bleach_allowlist import markdown_attrs, markdown_tags from cookbook.helper.mdx_attributes import MarkdownFormatExtension from cookbook.helper.mdx_urlize import UrlizeExtension from cookbook.models import Space, get_model_name diff --git a/recipes/urls.py b/recipes/urls.py index 0879fbcc..29af6332 100644 --- a/recipes/urls.py +++ b/recipes/urls.py @@ -15,9 +15,8 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.conf import settings -from django.conf.urls import url from django.contrib import admin -from django.urls import include, path +from django.urls import include, path, re_path from django.views.i18n import JavaScriptCatalog from django.views.static import serve from django_js_reverse import views as reverse_views @@ -35,5 +34,5 @@ urlpatterns = [ ] if settings.GUNICORN_MEDIA or settings.DEBUG: - urlpatterns += url(r'^media/(?P.*)$', serve, {'document_root': settings.MEDIA_ROOT}), - urlpatterns += url(r'^jsreverse.json$', reverse_views.urls_js, name='js_reverse'), + urlpatterns += re_path(r'^media/(?P.*)$', serve, {'document_root': settings.MEDIA_ROOT}), + urlpatterns += re_path(r'^jsreverse.json$', reverse_views.urls_js, name='js_reverse'), diff --git a/requirements.txt b/requirements.txt index a7488f62..f95c9893 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ bleach==3.3.0 -bleach-whitelist==0.0.11 +bleach-allowlist==1.0.3 Django==3.1.7 django-annoying==0.10.6 django-autocomplete-light==3.8.2