{value ? (
@@ -300,7 +307,7 @@ const ListContactInfoPanel = ({
if (header.listHderTy === ListHeaderConst.CONTENT_ITEM && (header.filterContents?.length ?? 0) > 0) {
return (
-
+
+
)
diff --git a/src/components/list-contact/ListUpdateHistoryPanel.tsx b/src/components/list-contact/ListUpdateHistoryPanel.tsx
index ea8d951..12c831c 100644
--- a/src/components/list-contact/ListUpdateHistoryPanel.tsx
+++ b/src/components/list-contact/ListUpdateHistoryPanel.tsx
@@ -22,7 +22,7 @@ const ListUpdateHistoryPanel = ({ prjctIdx, sid, listHeaders }: ListUpdateHistor
return (
-
+
{historyQuery.isLoading ? (
불러오는 중...
) : history.length === 0 ? (
diff --git a/src/lib/surveyUrl.ts b/src/lib/variableSubstitution.ts
similarity index 56%
rename from src/lib/surveyUrl.ts
rename to src/lib/variableSubstitution.ts
index 4c1228d..f19bdb5 100644
--- a/src/lib/surveyUrl.ts
+++ b/src/lib/variableSubstitution.ts
@@ -2,3 +2,16 @@
// 값이 없는 토큰은 빈 문자열로 치환한다.
export const substituteVariables = (contents: string, values: Record) =>
contents.replace(/\[\$([^\]]+)\]/g, (_, key: string) => values[key] ?? "");
+
+export const escapeHtml = (value: string) =>
+ value.replace(
+ /[&<>"']/g,
+ (character) =>
+ ({
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ })[character] ?? character,
+ );