mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-21 14:59:47 -04:00
adding escaping
This commit is contained in:
committed by
Alex Janousek
parent
bdc6db1d66
commit
981216689a
@@ -14,6 +14,7 @@ from flask import (
|
|||||||
url_for,
|
url_for,
|
||||||
)
|
)
|
||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
|
from markupsafe import escape
|
||||||
|
|
||||||
from app import current_organization, org_invite_api_client, organizations_client
|
from app import current_organization, org_invite_api_client, organizations_client
|
||||||
from app.enums import OrganizationType
|
from app.enums import OrganizationType
|
||||||
@@ -171,12 +172,12 @@ def _handle_edit_service(org_id, service_id):
|
|||||||
return {
|
return {
|
||||||
"id": service.id,
|
"id": service.id,
|
||||||
"name": (
|
"name": (
|
||||||
request.form.get("service_name", "").strip()
|
escape(request.form.get("service_name", "").strip())
|
||||||
if request.method == "POST"
|
if request.method == "POST"
|
||||||
else service.name
|
else service.name
|
||||||
),
|
),
|
||||||
"primary_contact": (
|
"primary_contact": (
|
||||||
request.form.get("primary_contact", "").strip()
|
escape(request.form.get("primary_contact", "").strip())
|
||||||
if request.method == "POST"
|
if request.method == "POST"
|
||||||
else (service.billing_contact_email_addresses or "")
|
else (service.billing_contact_email_addresses or "")
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user