Skip to content

Fix download preview test for Filament href escaping#26

Merged
swilla merged 1 commit into
mainfrom
fix/download-preview-test
Jun 9, 2026
Merged

Fix download preview test for Filament href escaping#26
swilla merged 1 commit into
mainfrom
fix/download-preview-test

Conversation

@swilla

@swilla swilla commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes the failing CI test introduced in the download button fix on main.
  • Filament 5.6+ escapes signed URL query strings in href attributes via e($url), producing & in HTML output. That is valid and works in browsers; the test was incorrectly expecting raw & characters in the rendered markup.
  • The updated test extracts the href, HTML-decodes it, and asserts it matches the signed URL while still guarding against double-encoding (&).

Test plan

  • vendor/bin/pest --ci passes locally
  • CI matrix (PHP 8.3/8.4 × Laravel 11/12/13) passes

Made with Cursor

Filament 5.6+ HTML-escapes signed URLs in href attributes, so assert the decoded href matches rather than expecting raw ampersands in the rendered HTML.

Co-authored-by: Cursor <cursoragent@cursor.com>
@swilla swilla merged commit 84b65b3 into main Jun 9, 2026
9 checks passed
@swilla swilla deleted the fix/download-preview-test branch June 9, 2026 19:37
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