diff --git a/app/modules/project/templates/project/inbox.html b/app/modules/project/templates/project/inbox.html index dab1fb6..6ecdfed 100644 --- a/app/modules/project/templates/project/inbox.html +++ b/app/modules/project/templates/project/inbox.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -99,5 +99,5 @@ {% include "project/_side_modals.html" %} {% include "project/_member_tasks_modal.html" %} - + {% endblock %} diff --git a/app/modules/project/templates/project/mytasks.html b/app/modules/project/templates/project/mytasks.html index d8ccbee..ac48554 100644 --- a/app/modules/project/templates/project/mytasks.html +++ b/app/modules/project/templates/project/mytasks.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -98,5 +98,5 @@ "today": {{ today | tojson }} } - + {% endblock %} diff --git a/app/modules/project/templates/project/project.html b/app/modules/project/templates/project/project.html index 71accb5..c288733 100644 --- a/app/modules/project/templates/project/project.html +++ b/app/modules/project/templates/project/project.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + @@ -465,5 +465,5 @@ - + {% endblock %} diff --git a/app/modules/project/templates/project/trash.html b/app/modules/project/templates/project/trash.html index 0dc336b..887ccf4 100644 --- a/app/modules/project/templates/project/trash.html +++ b/app/modules/project/templates/project/trash.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -68,5 +68,5 @@ {% include "project/_side_modals.html" %} {% include "project/_member_tasks_modal.html" %} - + {% endblock %} diff --git a/app/static/project.css b/app/static/project.css index 6f18857..19e1bac 100644 --- a/app/static/project.css +++ b/app/static/project.css @@ -638,6 +638,9 @@ .pj-comment-head { font-size: 12.5px; font-weight: 700; color: #1e1f21; } .pj-comment-time { font-weight: 400; color: #9aa1a9; font-size: 11px; margin-left: 6px; } .pj-comment-body { font-size: 13px; color: #333; margin-top: 1px; white-space: pre-wrap; } +/* 댓글 속 웹페이지 주소 — 누르면 새 탭(linkifyToHtml). 긴 주소는 줄바꿈 */ +.pj-comment-body a, .pj-chat-bubble a { color: #1a5fd0; text-decoration: underline; word-break: break-all; } +.pj-comment-body a:hover, .pj-chat-bubble a:hover { color: #0b3f99; } .pj-comment-form { display: flex; align-items: center; gap: 6px; } .pj-comment-form input { flex: 1; padding: 7px 10px; border: 1px solid #d8dce2; border-radius: 8px; font-size: 13px; font-family: inherit; box-sizing: border-box; } .pj-comment-acts { display: inline-flex; gap: 1px; flex: 0 0 auto; } diff --git a/app/static/project.js b/app/static/project.js index 4bd9f33..a3f9f56 100644 --- a/app/static/project.js +++ b/app/static/project.js @@ -1214,7 +1214,11 @@ const cmInput = el("pj-cm-input"); attachMentionInput(cmInput); if (cmInput) cmInput.addEventListener("paste", function (e) { - const items = (e.clipboardData || window.clipboardData || {}).items || []; + const cd = e.clipboardData || window.clipboardData || {}; + // 글자(웹페이지 주소 등)가 있으면 글자 붙여넣기가 먼저 — 일부 프로그램은 복사할 때 + // 글자와 함께 그림도 넣어서, 예전엔 그림으로 가로채 주소가 안 붙었다. + if (cd.getData && cd.getData("text/plain")) return; + const items = cd.items || []; let handled = false; for (let i = 0; i < items.length; i++) { if (items[i].type && items[i].type.indexOf("image/") === 0) { @@ -1291,7 +1295,7 @@ inner + ""; const bubble = li.querySelector(".pj-chat-bubble"); - if (bubble) bubble.textContent = c.body; + if (bubble) bubble.innerHTML = linkifyToHtml(c.body); // 주소 → 새 탭 링크(나머지는 이스케이프) if (mine) { li.querySelector(".pj-chat-del").addEventListener("click", async function () { if (!confirm("이 댓글을 삭제할까요? 첨부된 파일도 함께 삭제됩니다.")) return; @@ -4465,7 +4469,8 @@ '' + '' + ""; - li.querySelector(".pj-comment-body").textContent = c.body; // XSS 안전(textContent) + // 주소 → 새 탭 링크. linkifyToHtml 이 나머지 글자를 전부 이스케이프하므로 XSS 안전. + li.querySelector(".pj-comment-body").innerHTML = linkifyToHtml(c.body); li.querySelector(".pj-comment-del").addEventListener("click", async function () { try { await api("DELETE", "/project/api/comments/" + c.id); loadComments(taskId); } catch (e) { alert("삭제 실패: " + e.message); } diff --git a/docs/PROJECT_MODULE.md b/docs/PROJECT_MODULE.md index 5db47fe..6266784 100644 --- a/docs/PROJECT_MODULE.md +++ b/docs/PROJECT_MODULE.md @@ -117,7 +117,9 @@ > **댓글 말풍선(💬 N) 규칙** — 보드 카드·목록 행·캘린더 막대·내 작업 어디서든 **한 번 클릭**으로 댓글 > 대화창(`#pj-modal-comments`, `initCommentsChat`)이 열린다. `.pj-cmt-badge[data-task-id]` 만 달면 > 문서 캡처 단계 클릭 처리가 카드/행 클릭(작업 열기)보다 먼저 받아 막으므로 따로 연결할 필요 없다 -> (`wireBadge` 는 안 읽음 표시만). +> (`wireBadge` 는 안 읽음 표시만). 댓글 본문의 웹페이지 주소(`https://…`, `www.…`)는 작업 팝업 댓글· +> 대화창 모두 `linkifyToHtml` 로 새 탭 링크가 된다(나머지 글자는 이스케이프). 대화창 입력칸 붙여넣기는 +> 글자가 있으면 글자 우선, 그림만 있을 때 첨부. > > **담당자 고르기 규칙 — 모든 화면·앞으로 추가하는 기능 공통.** 담당자를 고르는 곳은 항상 "아이콘 + 이름". > 팝업 메뉴는 `assigneeMenuItems(emails, cur, onPick)` + `showContextMenu`(항목 `icon`/`checked` 지원), 폼의