mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Wrap message in Markup
This commit is contained in:
@@ -6,6 +6,7 @@ from flask import (
|
|||||||
render_template,
|
render_template,
|
||||||
abort
|
abort
|
||||||
)
|
)
|
||||||
|
from markupsafe import Markup
|
||||||
|
|
||||||
from app.main import main
|
from app.main import main
|
||||||
|
|
||||||
@@ -24,14 +25,16 @@ def accept_invite(token):
|
|||||||
invited_user = invite_api_client.check_token(token)
|
invited_user = invite_api_client.check_token(token)
|
||||||
|
|
||||||
if not current_user.is_anonymous() and current_user.email_address != invited_user.email_address:
|
if not current_user.is_anonymous() and current_user.email_address != invited_user.email_address:
|
||||||
flash("""
|
message = Markup("""
|
||||||
You’re signed in as {}.
|
You’re signed in as {}.
|
||||||
This invite is for another email address.
|
This invite is for another email address.
|
||||||
{} and click the link again to accept this invite.
|
{} and click the link again to accept this invite.
|
||||||
""".format(
|
""".format(
|
||||||
current_user.email_address,
|
current_user.email_address,
|
||||||
url_for("main.sign_out", _external=True)
|
url_for("main.sign_out", _external=True)))
|
||||||
))
|
|
||||||
|
flash(message=message)
|
||||||
|
|
||||||
abort(403)
|
abort(403)
|
||||||
|
|
||||||
if invited_user.status == 'cancelled':
|
if invited_user.status == 'cancelled':
|
||||||
|
|||||||
Reference in New Issue
Block a user