Skip to content

Commit bbca440

Browse files
committed
Merge branch 'release/1.0.9'
2 parents 0c3ddd1 + 181a7ff commit bbca440

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

โ€Žclient/src/features/editor/utils/domSyncUtils.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ export const setInnerHTML = ({ element, block }: SetInnerHTMLProps): void => {
9191

9292
// ํ˜„์žฌ ์Šคํƒ€์ผ์ด ์ ์šฉ๋œ ์ƒํƒœ๋ผ๋ฉด span์œผ๋กœ ๊ฐ์‹ธ์„œ ์ถ”๊ฐ€
9393
if (hasStylesApplied(currentState) && currentSpan) {
94-
currentSpan.appendChild(document.createTextNode(sanitizeText(currentText)));
94+
currentSpan.appendChild(document.createTextNode(currentText));
9595
fragment.appendChild(currentSpan);
9696
} else {
9797
// ์Šคํƒ€์ผ์ด ์—†๋‹ค๋ฉด ์ผ๋ฐ˜ ํ…์ŠคํŠธ ๋…ธ๋“œ๋กœ ์ถ”๊ฐ€
98-
fragment.appendChild(document.createTextNode(sanitizeText(currentText)));
98+
fragment.appendChild(document.createTextNode(currentText));
9999
}
100100
currentText = "";
101101
currentSpan = null;
@@ -267,19 +267,6 @@ const setsEqual = (a: Set<string>, b: Set<string>): boolean => {
267267
return true;
268268
};
269269

270-
const sanitizeText = (text: string): string => {
271-
return text.replace(/<br>/g, "\u00A0").replace(/[<>&"']/g, (match) => {
272-
const escapeMap: Record<string, string> = {
273-
"<": "&lt;",
274-
">": "&gt;",
275-
"&": "&amp;",
276-
'"': "&quot;",
277-
"'": "&#x27;",
278-
};
279-
return escapeMap[match] || match;
280-
});
281-
};
282-
283270
// ๋ฐฐ์—ด ๋น„๊ต ํ—ฌํผ ํ•จ์ˆ˜
284271
export const arraysEqual = (a: string[], b: string[]): boolean => {
285272
if (a.length !== b.length) return false;

0 commit comments

Comments
ย (0)