Skip to content

Commit

Permalink
Merge pull request #221 from boostcampwm-2024/Hotfix/#220_특수문자_드래그_해결
Browse files Browse the repository at this point in the history
Hotfix/#220 특수문자 있는 경우에도 텍스트 드래그 되도록 수정
  • Loading branch information
github-actions[bot] authored Nov 27, 2024
2 parents 37348c9 + f7d67c0 commit 3d909c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 2 additions & 0 deletions client/src/features/editor/components/block/Block.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export const textContainerStyle = cva({
base: {
...baseTextStyle,
position: "relative",
overflowWrap: "break-word",
whiteSpace: "pre-wrap",
"&:empty::before": {
color: "gray.300",
pointerEvents: "none",
Expand Down
8 changes: 1 addition & 7 deletions client/src/features/editor/utils/domSyncUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,7 @@ const setsEqual = (a: Set<string>, b: Set<string>): boolean => {
};

const sanitizeText = (text: string): string => {
return text
.replace(/<br>/g, "&nbsp;")
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
return text.replace(/<br>/g, "\u00A0");
};

// 배열 비교 헬퍼 함수
Expand Down

0 comments on commit 3d909c3

Please sign in to comment.