Skip to content

Treat +html structured MIME suffix as text#6

Open
sabat24 wants to merge 1 commit into
playwright-php:mainfrom
sabat24:fix/structured-suffix-html
Open

Treat +html structured MIME suffix as text#6
sabat24 wants to merge 1 commit into
playwright-php:mainfrom
sabat24:fix/structured-suffix-html

Conversation

@sabat24

@sabat24 sabat24 commented Jun 29, 2026

Copy link
Copy Markdown

Fixes #5

Problem

application/vnd.live-component+html (Symfony UX Live Component) was treated as binary. prepareFulfillOptions() base64-encoded the HTML body, so morphdom never updated the DOM during in-process Playwright intercept.

Solution

Extend structured suffix handling (+json, +xml) to +html, matching on the base MIME type before ; charset=… parameters.

Tests

  • testIsBinaryContentTypeTreatsStructuredHtmlSuffixAsText added
  • testPrepareFulfillOptionsLeavesLiveComponentHtmlAsPlainText added

application/vnd.live-component+html and other +html vendor types were
classified as binary and base64-encoded for route fulfillment, which
breaks morphdom in Symfony UX Live Component in-process E2E tests.
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.

ResponseConverter base64-encodes "+html" MIME types (breaks Live Component morphdom)

1 participant