From 0f4fcc286e1b3c8016516a1e056912bd6bfd0398 Mon Sep 17 00:00:00 2001 From: Sangjo LEE Date: Fri, 29 Dec 2023 23:23:22 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=94=BC=EB=93=9C=EB=B0=B1=EC=97=90?= =?UTF-8?q?=EC=84=9C=20XSS=20=EB=8C=80=EC=9D=91=20=EB=AC=B8=EC=9E=90?= =?UTF-8?q?=EC=97=B4=20=EC=9B=90=EB=B3=B5=20=EC=A0=81=EC=9A=A9=20(#466)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/feedback/[id].page.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/feedback/[id].page.tsx b/src/pages/feedback/[id].page.tsx index 90865552..1628a3ac 100644 --- a/src/pages/feedback/[id].page.tsx +++ b/src/pages/feedback/[id].page.tsx @@ -13,6 +13,7 @@ import useGetFeedbackById from '~/hooks/api/feedbacks/useGetFeedbackById'; import useInternalRouter from '~/hooks/router/useInternalRouter'; import colors from '~/styles/color'; import { BODY_1, HEAD_1, HEAD_2_BOLD, HEAD_2_REGULAR } from '~/styles/typo'; +import decodeString from '~/utils/decodeString'; export default function Feedback() { const router = useInternalRouter(); @@ -93,7 +94,11 @@ export default function Feedback() { return (
Q. {question.title}
-
{question.reply}
+
+ {question.reply.map((item, idx) => { + return decodeString(item) + (question.reply.length !== idx && '\n'); + })} +
); } else if (question.type === 'choice' && question.form_type !== 'tendency') { @@ -128,7 +133,6 @@ const containerCss = css` const titleCss = css` ${HEAD_1} - display: flex; align-items: center; background-color: ${colors.white}; @@ -173,7 +177,6 @@ const userInfoContainerCss = (theme: Theme) => css` const userInfoTitleCss = css` ${HEAD_2_REGULAR}; - color: ${colors.gray_400}; `; @@ -203,7 +206,6 @@ const questionTitleCss = css` const questionBodyCss = css` ${BODY_1} - margin-top: 10px; margin-bottom: 40px; color: ${colors.gray_500}; @@ -211,7 +213,6 @@ const questionBodyCss = css` const questionChoiceBodyCss = css` ${BODY_1} - margin-top: 25px; margin-bottom: 40px; color: ${colors.gray_500}; @@ -219,7 +220,6 @@ const questionChoiceBodyCss = css` const questionChoiceCss = css` ${HEAD_2_BOLD} - display: flex; align-items: center; justify-content: center;