Fix of an error when booking

This commit is contained in:
2026-10-05 22:11:21 +02:00
parent 0f1f3eda52
commit 06fa1dda68
+4 -2
View File
@@ -414,9 +414,11 @@ def _select_booking_admin() -> dict | None:
return None
def _sanitize_text(text: str, max_length: int = 255) -> str:
def _sanitize_text(text: object, max_length: int = 255) -> str:
"""Sanitize user text input: strip, limit length, and escape HTML."""
text = (text or "").strip()
if not isinstance(text, str):
return ""
text = text.strip()
if len(text) > max_length:
text = text[:max_length]
return text