feat(project): 설명 체크박스를 글머리 목록처럼(체크리스트) + 작업 창 스크롤바 정리

- ☑ = 체크리스트 켜기/끄기: 지금 줄(고른 줄들)을 <ul class="pj-checklist"> 로,
  줄마다 체크박스. Enter 로 새 줄에도 체크박스, 빈 줄 Enter 는 목록 끝.
  체크리스트 안에서 글머리·번호 버튼은 체크박스를 빼고 그 목록으로.
  체크한 줄은 흐리게 + 취소선
- 서버 정리기: ul 의 class 는 pj-checklist 하나만 허용(태그별 허용 class 표)
- 작업 창 스크롤 영역: 가로 스크롤 제거(설명란 음수 여백 때문에 생기던 것),
  오른쪽 여백까지 넓혀 세로 스크롤바를 창 오른쪽 끝으로
- 도움말 8장 체크리스트 설명 갱신, 정적 파일 버전 20260926q

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 14:32:58 +09:00
parent f8ff75127b
commit 5b0c5905b2
8 changed files with 144 additions and 19 deletions
+7 -3
View File
@@ -347,6 +347,8 @@ _DESC_ALLOWED_ATTRS: dict[str, frozenset[str]] = {
"img": frozenset({"src", "alt", "width", "height"}),
"span": frozenset({"class", "data-email"}),
"input": frozenset({"type", "checked"}),
# ul: 체크리스트(서식 도구 ☑ — 줄마다 체크박스) 표시용 class="pj-checklist" 하나만
"ul": frozenset({"class"}),
}
# URL 은 금지 목록이 아니라 허용 목록으로 검사한다. 금지 목록(javascript: 등)은
# "jav&#x09;ascript:" 처럼 중간에 탭/개행을 끼우면 통과하는데, 브라우저는 URL 을
@@ -368,6 +370,8 @@ def inline_safe_content_type(content_type: Any) -> bool:
return norm_str(content_type, lower=True).split(";", 1)[0].strip() in INLINE_SAFE_CONTENT_TYPES
# 멘션 칩: <span class="pj-mention" data-email="...">@이름</span>
_MENTION_CLASS = "pj-mention"
# 태그별로 남길 수 있는 class 값(하나씩) — 그 밖의 class 는 버린다.
_DESC_ALLOWED_CLASS: dict[str, str] = {"span": _MENTION_CLASS, "ul": "pj-checklist"}
# script/style 은 태그 자체는 물론 그 안의 텍스트(코드)도 통째로 버린다 —
# 허용 태그 목록에 없어 태그는 이미 안 남지만, HTMLParser는 이 둘의 내용을
# 별도 데이터로 넘기므로 handle_data 에서 따로 걸러야 한다.
@@ -438,9 +442,9 @@ class _DescriptionSanitizer(HTMLParser):
continue
if name == "src" and not desc_url_is_safe(value, allow_data_image=True):
continue
# class 는 멘션 칩 하나만 허용한다(임의 클래스로 화면 스타일을
# 흔들 여지를 남기지 않는다).
if name == "class" and value.strip() != _MENTION_CLASS:
# class 는 태그마다 정해진 값 하나만(멘션 칩·체크리스트) — 임의 클래스로
# 화면 스타일을 흔들 여지를 남기지 않는다.
if name == "class" and value.strip() != _DESC_ALLOWED_CLASS.get(tag):
continue
kept.append(f'{name}="{_desc_escape_attr(value)}"')
attr_text = (" " + " ".join(kept)) if kept else ""