Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion orbit-app/src/pages/profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ function Profile() {
type="text"
placeholder="Enter User ID"
value={userId}
onChange={(e) => setUserId(e.target.value)}
(e) => {
const sanitizedValue = sanitizeInput(e.target.value); // Ensure input is sanitized
setUserId(sanitizedValue);
}

function sanitizeInput(input) {
// Example sanitization function
return input.replace(/<[^>]*>?/gm, ''); // Removes HTML tags
}
/>

<button onClick={handleDelete}>
Expand Down