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?4 Replies
Hi @sundays, we've just run into the same bug in production.
as a temporary fix I'm using
addslashes
, I haven't had time to investigate it further right nowI'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
awesome