Skip to content

fix(confluence-mdx/mdx_to_storage): inline code span 내 HTML 특수문자를 이스케이프합니다#904

Merged
jk-kim0 merged 1 commit intomainfrom
jk/fix-reverse-sync-inline-escape
Mar 11, 2026
Merged

fix(confluence-mdx/mdx_to_storage): inline code span 내 HTML 특수문자를 이스케이프합니다#904
jk-kim0 merged 1 commit intomainfrom
jk/fix-reverse-sync-inline-escape

Conversation

@jk-kim0
Copy link
Contributor

@jk-kim0 jk-kim0 commented Mar 11, 2026

Description

`<`, `>`, `&` 등 HTML 특수문자가 포함된 코드 스니펫을 XHTML로 변환할 때
이스케이프되지 않아 XHTML 파싱 오류나 렌더링 깨짐이 발생하는 버그를 수정합니다.

변경 전: ```SELECT * FROM t WHERE x < 10``` → `SELECT * FROM t WHERE x < 10` ❌
변경 후: ```SELECT * FROM t WHERE x < 10``` → `SELECT * FROM t WHERE x < 10` ✅

변경 파일

  • `bin/mdx_to_storage/inline.py`: `convert_inline`, `convert_heading_inline`의 `_restore_code`에 `html.escape()` 적용

reverse_sync 동일 버그

`reverse_sync/mdx_to_xhtml_inline.py`의 `_convert_code_spans`도 동일한 버그가 있으며 #910에서 수정됩니다.

Added/updated tests?

  • Yes — `TestConvertInline`에 `<`, `>`, `&`, HTML 태그 형식 escape 케이스 4개 추가

관련 PR

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
querypie-docs Ready Ready Preview, Comment Mar 11, 2026 11:53am

Request Review

\`<\`, \`>\`, \`&\` 등 HTML 특수문자가 포함된 코드 스니펫이 XHTML로 변환될 때
이스케이프되지 않아 XHTML 파싱 오류나 렌더링 깨짐이 발생하는 버그를 수정합니다.

- bin/mdx_to_storage/inline.py: convert_inline, convert_heading_inline의 _restore_code에 html.escape() 적용
- bin/reverse_sync/mdx_to_xhtml_inline.py: _convert_code_spans에 html.escape() 적용
- tests/test_reverse_sync_mdx_to_xhtml_inline.py: HTML 특수문자 escape 테스트 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-inline-escape branch from 8050031 to e99a9c9 Compare March 11, 2026 11:50
@jk-kim0 jk-kim0 changed the title fix(confluence-mdx): reverse-sync inline 코드 HTML 이스케이프, ol start 속성, 헤딩 공백 처리 fix(confluence-mdx): inline code span 내 HTML 특수문자를 이스케이프합니다 Mar 11, 2026
@jk-kim0 jk-kim0 self-assigned this Mar 11, 2026
@jk-kim0 jk-kim0 changed the title fix(confluence-mdx): inline code span 내 HTML 특수문자를 이스케이프합니다 fix(confluence-mdx/mdx_to_storage): inline code span 내 HTML 특수문자를 이스케이프합니다 Mar 11, 2026
@jk-kim0 jk-kim0 merged commit 4073482 into main Mar 11, 2026
7 checks passed
@jk-kim0 jk-kim0 deleted the jk/fix-reverse-sync-inline-escape branch March 11, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant