Conversation
Co-authored-by: elecbug <81972855+elecbug@users.noreply.github.com>
Co-authored-by: elecbug <81972855+elecbug@users.noreply.github.com>
Co-authored-by: elecbug <81972855+elecbug@users.noreply.github.com>
Co-authored-by: elecbug <81972855+elecbug@users.noreply.github.com>
Co-authored-by: elecbug <81972855+elecbug@users.noreply.github.com>
Co-authored-by: elecbug <81972855+elecbug@users.noreply.github.com>
Co-authored-by: elecbug <81972855+elecbug@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
elecbug
September 25, 2026 08:30
View session
elecbug
marked this pull request as ready for review
September 25, 2026 08:31
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문서 렌더링 경로 전반에서 사용자/데이터 기반 속성이 그대로 HTML에 주입되고 있었고, TOC는 헤딩 ID를 단순 인덱스로 덮어써 앵커 충돌과 북마크 호환성 문제가 있었습니다. 이번 변경은 공통 정제 계층을 도입해 렌더링 경로를 일관되게 보호하고, TOC 앵커 생성 방식을 안정적으로 정리합니다.
HTML/속성 이스케이프 공통화
src/scripts/utils/html.ts를 추가해 HTML 텍스트, HTML 속성, 링크 URL, 에셋 URL 정제를 공통 유틸로 분리했습니다.button-component,card-component,home-link-card-component,nav-component,contributor-component가 이 유틸을 사용하도록 정리했습니다.링크 URL과 에셋 URL 처리 분리
내비게이션/버튼 링크는 SPA에서 의도한 내부 해시 경로와 안전한 스킴만 허용하도록 제한했습니다.
반면 이미지/아바타는 상대 경로와
http/https를 유지할 수 있도록 별도 정제 경로를 사용해 기존 렌더링을 깨지 않도록 했습니다.기여자 프로필 링크 정확성 보완
GitHub 사용자명은 형식 검증을 통과하는 경우에만 직접 프로필 링크를 만들고, 그렇지 않으면 잘못된 다른 계정으로 이동하지 않도록 안전한 기본 링크로 처리합니다.
TOC 헤딩 ID 안정화 및 레거시 호환
헤딩 ID를 단순 숫자 대신 텍스트 기반 slug로 생성해 충돌 가능성을 낮췄습니다.
기존 숫자 앵커 북마크가 끊기지 않도록 legacy anchor도 함께 삽입해 이전 링크 호환성을 유지합니다.
회귀 테스트 보강
URL 정제 허용/차단 범위, TOC slug 생성, 기존 ID 보존, legacy anchor 생성 케이스를 테스트에 추가해 변경 동작을 고정했습니다.
예시: