kirby-dreamform
kirby-dreamform copied to clipboard
Title of custom actions log entry is unreadable
trafficstars
When setting the the title of a custom Dreamform action log entry, the title prop passed is encoded with encodeURIComponent. This will break template string rendering and can make the title unreadable.
class CustomAction extends Action {
public function run(): void {
$this->log(
[
'template' => [
'title' => 'Custom Action Title'
]
],
type: 'info',
icon: 'icon',
title: 'Template Test {{ title }}'
);
}
}
Thie will create a log entry with an encoded title.
The encoding is happening in BaseEntry.vue
https://github.com/tobimori/kirby-dreamform/blob/fdd70f9f8d9b451badd3607379bed738928ff4a4/src/components/log/EntryBase.vue#L23-L27
I'm not sure why encodeURIComponent is used here but removing it fixed the issue.
idk why I added it tbh :D thanks