Skip to content

Commit

Permalink
Fix code scanning alert no. 6: DOM text reinterpreted as HTML
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Priyankar Pal  <[email protected]>
  • Loading branch information
1 parent 773ab0e commit 3fb034f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plays/personal-profile-card/components/profile-form.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import DOMPurify from 'dompurify';

import ProfileType from '../types';
import placeholder_cover from '../images/placeholder_cover.jpg';
Expand Down Expand Up @@ -27,7 +28,7 @@ const ProfileForm = ({ value, profile, onChange, onClick, onUpload, onClear }: P
<img
alt={value.cover === '' ? 'placeholder cover' : 'cover'}
className="w-full md:w-[600px] h-[150px] sm:h-[200px] rounded-3xl"
src={value.cover === '' ? placeholder_cover : value.cover}
src={value.cover === '' ? placeholder_cover : DOMPurify.sanitize(value.cover)}
/>
<input
accept="image/*"
Expand Down

0 comments on commit 3fb034f

Please sign in to comment.