From 28aa0c05d56769f7bd58b8f4c64814eac93d575c Mon Sep 17 00:00:00 2001 From: Hirotaka Miyagi <31152321+MH4GF@users.noreply.github.com> Date: Tue, 15 Oct 2024 13:26:37 +0900 Subject: [PATCH] fix: escape special characters Co-authored-by: hoshino tsuyoshi --- .../posts/components/ShareDropdownMenu/ShareDropdownMenu.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/apps/service-site/src/features/posts/components/ShareDropdownMenu/ShareDropdownMenu.tsx b/frontend/apps/service-site/src/features/posts/components/ShareDropdownMenu/ShareDropdownMenu.tsx index b0b34dac3..5c6983c55 100644 --- a/frontend/apps/service-site/src/features/posts/components/ShareDropdownMenu/ShareDropdownMenu.tsx +++ b/frontend/apps/service-site/src/features/posts/components/ShareDropdownMenu/ShareDropdownMenu.tsx @@ -24,8 +24,8 @@ const handleSelect = (url: string) => () => { export const ShareDropdownMenu: FC = ({ children, lang }) => { const [open, setOpen] = useState(false) const { t } = getTranslation(lang) - const url = window.location.href - const title = document.title + const url = encodeURIComponent(window.location.href) + const title = encodeURIComponent(document.title) return (