Timothy-Vinzent commited on
Commit
f5e6b21
·
verified ·
1 Parent(s): bee7793

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -59,11 +59,9 @@ def sanitize_input(text):
59
 
60
  def sanitize_prompt(text):
61
  """
62
- Sanitizes input to prevent harmful content and limits its length.
63
  """
64
- # Allow alphanumerics and some punctuation, then truncate to 500 characters.
65
- clean_text = re.sub(r"[^a-zA-Z0-9\s.,!?@:\-]", "", text)
66
- return clean_text.strip()[:8000]
67
  def validate_email(email):
68
  """
69
  Validates that the provided email is in a valid format.
 
59
 
60
  def sanitize_prompt(text):
61
  """
62
+ Sanitizes input to limits its length.
63
  """
64
+ return text.strip()[:8000]
 
 
65
  def validate_email(email):
66
  """
67
  Validates that the provided email is in a valid format.