Skip to content

Commit

Permalink
fix: titleは事前にencodeしておく
Browse files Browse the repository at this point in the history
  • Loading branch information
yossydev committed Mar 7, 2024
1 parent ec88781 commit 748178a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/islands/SnsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const SnsButton: FC<{ title: string }> = ({ title }) => {
return (
<div class="flex items-center justify-center mt-10 gap-3">
<a
href={`https://twitter.com/share?url=${window.location.href}&text=${title}`}
href={`https://twitter.com/share?text=${encodeURI(title)}&url=${
window.location.href
}`}
target={"_blank"}
rel={"noreferrer"}
class="bg-[#0f1419] text-white flex items-center text-sm rounded-3xl py-3 px-4"
Expand Down

0 comments on commit 748178a

Please sign in to comment.