fix: PC 공개 일정 페이지 HTML 엔티티 디코딩 수정
- decodeHtmlEntities 함수 추가하여 < > 등 올바르게 표시 - 레이아웃 변경 없음 (원래 상태 유지)
This commit is contained in:
parent
97767bc5ca
commit
22db79e960
1 changed files with 10 additions and 2 deletions
|
|
@ -7,6 +7,14 @@ import { useInView } from 'react-intersection-observer';
|
|||
import { getTodayKST } from '../../../utils/date';
|
||||
import { getSchedules, getCategories, searchSchedules as searchSchedulesApi } from '../../../api/public/schedules';
|
||||
|
||||
// HTML 엔티티 디코딩 함수
|
||||
const decodeHtmlEntities = (text) => {
|
||||
if (!text) return '';
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.innerHTML = text;
|
||||
return textarea.value;
|
||||
};
|
||||
|
||||
function Schedule() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
|
|
@ -840,7 +848,7 @@ function Schedule() {
|
|||
|
||||
{/* 스케줄 내용 */}
|
||||
<div className="flex-1 p-6 flex flex-col justify-center">
|
||||
<h3 className="font-bold text-lg mb-2">{schedule.title}</h3>
|
||||
<h3 className="font-bold text-lg mb-2">{decodeHtmlEntities(schedule.title)}</h3>
|
||||
|
||||
<div className="flex flex-wrap gap-3 text-base text-gray-500">
|
||||
{schedule.time && (
|
||||
|
|
@ -927,7 +935,7 @@ function Schedule() {
|
|||
<span className="text-sm font-medium opacity-80">{formatted.weekday}</span>
|
||||
</div>
|
||||
<div className="flex-1 p-6 flex flex-col justify-center">
|
||||
<h3 className="font-bold text-lg mb-2">{schedule.title}</h3>
|
||||
<h3 className="font-bold text-lg mb-2">{decodeHtmlEntities(schedule.title)}</h3>
|
||||
<div className="flex flex-wrap gap-3 text-base text-gray-500">
|
||||
{schedule.time && (
|
||||
<span className="flex items-center gap-1">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue