Possible bug with unescaped quotes in table group titles

My seeder generated some random data and one of the record names happened to have a single quote in the name. It resulted in this alpine error (see pic, isGroupCollapsed) I can fix it by adding ->getTitleFromRecordUsing(fn ($record) => addslashes($record->organization->name)) but then the slash actually shows up in the UI. Is this a bug that should be reported on github or am I doing something wrong?
No description
4 Replies
Tetracyclic
Tetracyclic7mo ago
Hi @sundays, we've just run into the same bug in production.
sundays
sundaysOP7mo ago
as a temporary fix I'm using addslashes, I haven't had time to investigate it further right now
Tetracyclic
Tetracyclic7mo ago
I've opened a PR with a fix for this issue: https://github.com/filamentphp/filament/pull/13178
GitHub
Escape $recordGroupTitle when passed to Alpine in table view by r...
Description Fixes #13153 by escaping the $recordGroupTitle when it was passed to Alpine via attributes. Functional changes Use Js::from() to escape record title
sundays
sundaysOP7mo ago
awesome
Want results from more Discord servers?
Add your server