Skip to content

Commit 4ee05ca

Browse files
authored
Merge pull request #94 from openhacku-saboten/morio/fix_updateprofile
記事タイトルを`encodeURIComponent`
2 parents c3b863c + dab81dc commit 4ee05ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pages/post/[postid].tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,11 @@ const PostDetail: NextPage = () => {
496496
<Button
497497
href={`http://twitter.com/share?url=${process.env.baseUrl}${
498498
router.asPath
499-
}%0A&text=${
499+
}%0A&text=${encodeURIComponent(
500500
post.title.length > 70
501501
? post.title.slice(0, 70) + '...'
502502
: post.title
503-
}%0A&hashtags=OmnisCode`}
503+
)}%0A&hashtags=OmnisCode`}
504504
target="_blank"
505505
variant="contained"
506506
className={styles.twitterShareButton}

0 commit comments

Comments
 (0)