Skip to content

Commit 773ab0e

Browse files
Fix code scanning alert no. 8: DOM text reinterpreted as HTML (#1546)
Signed-off-by: Priyankar Pal <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent b302a00 commit 773ab0e

File tree

1 file changed

+1
-1
lines changed
  • src/plays/sticky-notes/components

1 file changed

+1
-1
lines changed

src/plays/sticky-notes/components/Note.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Note = ({ note, handleDelete, handleEdit }) => {
1111
<p className="text-white capitalize text-lg pt-2">{note.body}</p>
1212
<a
1313
className="pt-5 mt-auto block text-blue-900"
14-
href={`https://twitter.com/intent/tweet?text="${note.body}`}
14+
href={`https://twitter.com/intent/tweet?text="${encodeURIComponent(note.body)}`}
1515
rel="noreferrer"
1616
target="_blank"
1717
>

0 commit comments

Comments
 (0)