Skip to content

Fix malformed URLs crashing the entire build#45

Merged
shenxianpeng merged 3 commits into
mainfrom
fix/3939-malformed-url-crash
Apr 26, 2026
Merged

Fix malformed URLs crashing the entire build#45
shenxianpeng merged 3 commits into
mainfrom
fix/3939-malformed-url-crash

Conversation

@shenxianpeng
Copy link
Copy Markdown
Member

@shenxianpeng shenxianpeng commented Apr 26, 2026

A single markdown link with a malformed URL (e.g. an unterminated IPv6 literal) used to raise ValueError from urlsplit(), crashing the entire build. Wrap the call in a try/except, log a warning naming the file and offending URL, and continue building the rest of the page.

Closes mkdocs/mkdocs#3939

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build / dependency update
  • Other (describe below)

Checklist

  • New tests added for new behavior (if applicable)
  • Documentation updated (if applicable)
  • Release notes docs/about/release-notes.md updated (if applicable)

A single markdown link with a malformed URL (e.g. an unterminated IPv6
literal) used to raise ValueError from urlsplit(), crashing the entire
build. Wrap the call in a try/except, log a warning naming the file and
offending URL, and continue building the rest of the page.

Closes mkdocs/mkdocs#3939
@github-actions github-actions Bot added the bug Something isn't working label Apr 26, 2026
@shenxianpeng shenxianpeng changed the title Fix malformed URLs crashing the entire build (#3939) Fix malformed URLs crashing the entire build Apr 26, 2026
Comment thread docs/about/release-notes.md Outdated
@shenxianpeng shenxianpeng merged commit b33d9f2 into main Apr 26, 2026
23 checks passed
@shenxianpeng shenxianpeng deleted the fix/3939-malformed-url-crash branch April 26, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Line number not provided on build failure when urllib urlsplit fails

1 participant