From 0521e3d0ec32d2350ab4c65691989437c9ebc40d Mon Sep 17 00:00:00 2001 From: caadiq Date: Sat, 10 Jan 2026 10:26:21 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EC=9D=BC?= =?UTF-8?q?=EC=A0=95=20HTML=20=EC=97=94=ED=8B=B0=ED=8B=B0=20=EB=94=94?= =?UTF-8?q?=EC=BD=94=EB=94=A9=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - decodeHtmlEntities 함수 추가 - ScheduleCard, TimelineScheduleCard title에 적용 - & → & 등으로 올바르게 표시 --- frontend/src/pages/mobile/public/Schedule.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/mobile/public/Schedule.jsx b/frontend/src/pages/mobile/public/Schedule.jsx index 9ba32c6..33016fd 100644 --- a/frontend/src/pages/mobile/public/Schedule.jsx +++ b/frontend/src/pages/mobile/public/Schedule.jsx @@ -6,6 +6,14 @@ import { useInView } from 'react-intersection-observer'; import { useVirtualizer } from '@tanstack/react-virtual'; import { getSchedules, getCategories, searchSchedules } from '../../../api/public/schedules'; +// HTML 엔티티 디코딩 함수 +const decodeHtmlEntities = (text) => { + if (!text) return ''; + const textarea = document.createElement('textarea'); + textarea.innerHTML = text; + return textarea.value; +}; + // 모바일 일정 페이지 function MobileSchedule() { const [selectedDate, setSelectedDate] = useState(new Date()); @@ -570,7 +578,7 @@ function ScheduleCard({ schedule, categoryColor, categories, delay = 0 }) { style={{ backgroundColor: categoryColor }} />
-

{schedule.title}

+

{decodeHtmlEntities(schedule.title)}

{schedule.time && ( @@ -650,7 +658,7 @@ function TimelineScheduleCard({ schedule, categoryColor, categories, delay = 0 } {/* 제목 */}

- {schedule.title} + {decodeHtmlEntities(schedule.title)}

{/* 출처 */}