Skip to content

Fix data URI fragments being decoded as payload - #2775

Open
Huzaifa Asim (huzaifaasim017) wants to merge 1 commit into
microsoft:mainfrom
huzaifaasim017:fix/data-uri-fragments
Open

Huzaifa Asim (huzaifaasim017) wants to merge 1 commit into
microsoft:mainfrom
huzaifaasim017:fix/data-uri-fragments

Conversation

@huzaifaasim017

Copy link
Copy Markdown

Summary

  • Strip raw URI fragments before decoding data URI content, preventing extra text or bytes from entering the converted document.
  • Add regression coverage for plain text, base64, escaped #, and ? payloads through both the parser and public conversion API.

Fixes #2690. Thanks to Bicheng (Kenneth) (@BichengWang) for the detailed reproduction and expected behavior.

Verification

  • pytest -q packages/markitdown/tests/test_module_misc.py -k data_uri: 5 passed.
  • Full test_module_misc.py: 162 passed, 11 skipped, 2 unrelated failures in this minimal environment (audio transcription and optional PPTX dependency).

Developed with AI assistance; I reviewed the change and ran the tests above.

@huzaifaasim017

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

San-Hsien (SanHsien) added a commit to SanHsien/markitdown that referenced this pull request Oct 26, 2026
…R watermark

Ten new upstream PRs, none adopted. Four are real fixes (xlsx error
values, ipynb string source, RSS 1.0, data URI fragment) whose defects
reproduce on this fork but are outside the Windows/CJK exception class;
six are noise or re-submissions of already-adopted microsoft#1913. Reasons and
revisit triggers are in docs/DECISIONS.md. PR watermark 2765 -> 2775.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

Data URI fragments are decoded as payload, appending text or corrupting bytes

1 participant