fix static scan warnings

This commit is contained in:
Kenneth Kehl
2025-04-01 08:00:33 -07:00
parent e419d843a6
commit 91f3e6a557
9 changed files with 32 additions and 29 deletions

View File

@@ -698,9 +698,7 @@ def _get_content_count_error_and_message_for_template(template):
# Check for blocked characters
if contains_blocked_characters(template.content):
warning = f"{s1}{s2}"
return False, Markup(
warning
) # 🚨 ONLY show the warning, hiding "Will be charged..."
return False, Markup(warning) # nosec
# If message is too long, return the length error
if template.is_message_too_long():
@@ -715,11 +713,11 @@ def _get_content_count_error_and_message_for_template(template):
return False, Markup(
f"Will be charged as {message_count(template.fragment_count, template.template_type)} "
f"(not including personalization)."
)
) # nosec
return False, Markup(
f"Will be charged as {message_count(template.fragment_count, template.template_type)}."
)
) # nosec
@main.route(