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

The Organization Variable #{ticket.organization.name} is not rendered correctly #5108

Open
Bozo0511 opened this issue Apr 2, 2024 · 1 comment

Comments

@Bozo0511
Copy link
Collaborator

Bozo0511 commented Apr 2, 2024

Used Zammad Version

6.2

Environment

  • Installation method: any
  • Operating system (if you're unsure: cat /etc/os-release ): any
  • Database + version: any
  • Elasticsearch version: any
  • Browser + version: any

Actual behaviour

I created a trigger to edit the title of incoming emails with help of the following variables.
#{ticket.organization.name}
#{ticket.title}

the ticket title ischanged to: Joe & Bob Inc - Need help

organisation name is: Joe & Bob Inc

Expected behaviour

I created a trigger to edit the title of incoming emails with help of the following variables.
#{ticket.organization.name}
#{ticket.title}

I would expect that the organization name is shown like written in Organization. example: Joe & Bob Inc

Steps to reproduce the behaviour

1.Create Trigger:
Action > is > created
status > is not > closed
Typ > is > email
sender > is not > system
title > contains not > #{ticket.organization.name}

makes following changes:
title > #{ticket.organization.name} - #{ticket.title}

2 Create a ticket via email with the title: need Help

name of the Organization: Joe & Bob Inc
name of the Organization in the title: Joe & Bob Inc - Need help

Screen Recording (02.04.2024 15-21-16).wmv.zip

Support Ticket

Ticket#10153203

I'm sure this is a bug and no feature request or a general question.

yes

@mantas
Copy link
Collaborator

mantas commented Apr 22, 2024

This is a very interesting issue. The new data is escaped (see

) when assigning. However, ticket title is always escaped too. This causes special characters to be double-escaped.

The solution could be to not escape the new value at the time of executing the trigger. A check to ensure that only title is not (double-)escaped may be needed though. Theoretically title is the only field that allows such value to be set (adding notes and sending email is a different mechanism). But someone may be (ab)using this feature in unexpected ways and such change may backfire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants