Skip to content

Adjust data: URI mediatype tests for loofah 2.25.2 - #222

Merged
flavorjones merged 1 commit into
mainfrom
fix-mediatype-tests
Jul 14, 2026
Merged

Adjust data: URI mediatype tests for loofah 2.25.2#222
flavorjones merged 1 commit into
mainfrom
fix-mediatype-tests

Conversation

@flavorjones

Copy link
Copy Markdown
Member

Loofah v2.25.2 will parse data: URI mediatypes following the WHATWG data: URL spec, so an omitted or invalid mediatype will resolve to text/plain and thus will be allowed, matching how a browser reads it.

This gem supports loofah ~> 2.25, so the tests branch on Loofah::VERSION and pass against both old and new loofah.

ref: flavorjones/loofah#305
ref: https://fetch.spec.whatwg.org/#data-urls

@flavorjones flavorjones changed the title Adjust data: URI mediatype tests for loofah 2.25.2 Adjust data: URI mediatype tests for loofah 2.25.2 Jul 14, 2026
Loofah v2.25.2 will parse `data:` URI mediatypes following the WHATWG
`data:` URL spec, so an omitted or invalid mediatype will resolve to
`text/plain` and thus will be allowed, matching how a browser reads
it.

This gem supports `loofah ~> 2.25`, so the tests branch on
`Loofah::VERSION` and pass against both old and new loofah.

ref: flavorjones/loofah#305
ref: https://fetch.spec.whatwg.org/#data-urls
@flavorjones
flavorjones force-pushed the fix-mediatype-tests branch from 3a5174b to acd298b Compare July 14, 2026 15:54
@flavorjones
flavorjones merged commit 11ee440 into main Jul 14, 2026
15 checks passed
@flavorjones
flavorjones deleted the fix-mediatype-tests branch July 14, 2026 15:55
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