diff --git a/analytics/views/activity_common.py b/analytics/views/activity_common.py index ef285e8bce..c6cf762aac 100644 --- a/analytics/views/activity_common.py +++ b/analytics/views/activity_common.py @@ -9,7 +9,7 @@ from django.db.backends.utils import CursorWrapper from django.db.models.query import QuerySet from django.template import loader from django.urls import reverse -from jinja2.utils import Markup as mark_safe +from markupsafe import Markup as mark_safe eastern_tz = pytz.timezone("US/Eastern") diff --git a/analytics/views/installation_activity.py b/analytics/views/installation_activity.py index 9dd2dfe19f..5bbe3ab1a7 100644 --- a/analytics/views/installation_activity.py +++ b/analytics/views/installation_activity.py @@ -10,7 +10,7 @@ from django.http import HttpRequest, HttpResponse from django.shortcuts import render from django.template import loader from django.utils.timezone import now as timezone_now -from jinja2.utils import Markup as mark_safe +from markupsafe import Markup as mark_safe from psycopg2.sql import SQL, Composable, Literal from analytics.lib.counts import COUNT_STATS diff --git a/zerver/forms.py b/zerver/forms.py index 35f1055b64..25e47c65f0 100644 --- a/zerver/forms.py +++ b/zerver/forms.py @@ -14,7 +14,7 @@ from django.http import HttpRequest from django.urls import reverse from django.utils.http import urlsafe_base64_encode from django.utils.translation import gettext as _ -from jinja2.utils import Markup as mark_safe +from markupsafe import Markup as mark_safe from two_factor.forms import AuthenticationTokenForm as TwoFactorAuthenticationTokenForm from two_factor.utils import totp_digits diff --git a/zerver/lib/upload.py b/zerver/lib/upload.py index 67fc84b072..97c82ef9ee 100644 --- a/zerver/lib/upload.py +++ b/zerver/lib/upload.py @@ -23,7 +23,7 @@ from django.core.signing import BadSignature, TimestampSigner from django.http import HttpRequest from django.urls import reverse from django.utils.translation import gettext as _ -from jinja2.utils import Markup as mark_safe +from markupsafe import Markup as mark_safe from mypy_boto3_s3.client import S3Client from mypy_boto3_s3.service_resource import Bucket, Object from PIL import Image, ImageOps diff --git a/zerver/views/auth.py b/zerver/views/auth.py index f185348d3c..9d242cff95 100644 --- a/zerver/views/auth.py +++ b/zerver/views/auth.py @@ -24,7 +24,7 @@ from django.utils.http import url_has_allowed_host_and_scheme from django.utils.translation import gettext as _ from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_safe -from jinja2.utils import Markup as mark_safe +from markupsafe import Markup as mark_safe from social_django.utils import load_backend, load_strategy from two_factor.forms import BackupTokenForm from two_factor.views import LoginView as BaseTwoFactorLoginView