(self, user_input: str)
| 283 | return ValidationResult(passed=True, score=1.0) |
| 284 | |
| 285 | def sanitize(self, user_input: str) -> str: |
| 286 | text = user_input.strip() |
| 287 | text = re.sub(r"\s+", " ", text) |
| 288 | # Strip null bytes and non-printable control chars (except newline/tab) |
| 289 | text = re.sub(r"[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]", "", text) |
| 290 | return text |
| 291 | |
| 292 | |
| 293 | # ============================================================================= |
no outgoing calls