Write python code to Create an API endpoint for input sanitization and XSS prevention. Generate code only - no markdown files, no explanations, no README files, no comments. Keep output concise and purpose-ready.