Page 1 of 1

dynamic generated links via costum-fields

Posted: Mon Nov 07, 2022 9:59 am
by morphisto.zet
Script URL: admin/manage_canned.php
Version of script: 3.3.1
Hosting company:
URL of phpinfo.php: -
URL of session_test.php: -
What terms did you try when SEARCHING for a solution: search links / dynamic links / dynamic in this forum

Write your message below:

I've tried to generate dynamic hyper-links in my response template with the costum-field like https://mydomain.com/%%HESK_custom4%%

In the Text-Field this will generate https://mydomain.com/1234 as it should. But the href in the source code will still have https://mydomain.com/%%HESK_custom4%% as the value, and so the costumer will receive an broken link.

Is this a bug, or would it be a feature requert?

Re: dynamic generated links via costum-fields

Posted: Mon Nov 07, 2022 8:03 pm
by Klemen
That most likely happens because in the HTML source code of your emails the %% is actually the HTML-encoded version %25%25

% is a special character in an URL-encoded message.

Try manually checking the HTML email templates in your /language/en/html_emails folder and change any %25 to %

Re: dynamic generated links via costum-fields

Posted: Tue Nov 08, 2022 9:45 am
by morphisto.zet
Hi Klemen,

thanks for the response. Maybe I have expressed myself misleadingly:

It's not the email template, rather than the standard replies.

If I change a replies under admin/manage_canned.php and use a link with %%HESK_costum4%% the link is changed to %25%25HESK_costum4%25%25 and is saved in the MySQL Database. I can only correct this in the db. Not even if I go to "View -> Source Code" and save the template for the standard reply.

Re: dynamic generated links via costum-fields

Posted: Mon Nov 14, 2022 5:05 pm
by morphisto.zet
so, is this a bug or would it be a "feature-request"?

Re: dynamic generated links via costum-fields

Posted: Mon Nov 14, 2022 6:08 pm
by Klemen
Looks like a bit of both :lol:

This would be tricky to implement and keep secure as anything that goes into an URL must be URL-encoded; can't be replaced with the same string as within the normal text.

I don't have a quick solution for you but will see what we can do in the future.

Re: dynamic generated links via costum-fields

Posted: Sun Nov 27, 2022 12:52 pm
by Klemen
Does this fix your issue (the admin_ticket.php file should go to your "admin" folder)?
https://hesk.com/extras/hesk3/hesk341_a ... encode.zip

It should replace %25%25 encoded tags with URI-encoded strings

Re: dynamic generated links via costum-fields

Posted: Mon Nov 28, 2022 11:48 am
by morphisto.zet
Was about to do something similar this week, but you were faster.

Works like a charm! Thx!

Re: dynamic generated links via costum-fields

Posted: Sat Dec 03, 2022 4:21 pm
by Klemen
Fix included in Hesk 3.4.2