Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title of custom actions log entry is unreadable #118

Open
ovenum opened this issue Feb 18, 2025 · 1 comment
Open

Title of custom actions log entry is unreadable #118

ovenum opened this issue Feb 18, 2025 · 1 comment
Labels
type: bug 🐛 Something isn't working

Comments

@ovenum
Copy link
Contributor

ovenum commented Feb 18, 2025

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.
Image

The encoding is happening in BaseEntry.vue

<span
v-html="
$t(props.title, props.template, encodeURIComponent(props.title))
"
></span>

I'm not sure why encodeURIComponent is used here but removing it fixed the issue.

@ovenum ovenum changed the title Title of custom actions log entry is encoded via encodeURIComponent Title of custom actions log entry is unreadable Feb 18, 2025
@tobimori tobimori added the type: bug 🐛 Something isn't working label Feb 19, 2025
@tobimori
Copy link
Owner

idk why I added it tbh :D thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants